<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How a Partitioning Mistake Turned a 12-Minute Databricks Job Into a 2-Hour Nightmare in Community Articles</title>
    <link>https://community.databricks.com/t5/community-articles/how-a-partitioning-mistake-turned-a-12-minute-databricks-job/m-p/159918#M1290</link>
    <description>&lt;P&gt;Hello Databricks Community!&lt;/P&gt;&lt;P&gt;I recently published a detailed breakdown on Medium about a real-world optimization nightmare we faced, and I wanted to share the core lessons learned with this group.&lt;/P&gt;&lt;P&gt;We had a highly efficient Delta table pipeline handling &lt;STRONG&gt;1.2 billion records&lt;/STRONG&gt; that completed its hourly incremental updates in just &lt;STRONG&gt;12 minutes&lt;/STRONG&gt;. In a bid to speed up specific queries, we made a seemingly logical choice: partitioning the table by a high-cardinality column (TransactionID).&lt;/P&gt;&lt;P&gt;Instead of speeding things up, this single layout choice turned our 12-minute job into a &lt;STRONG&gt;2-hour nightmare&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;The root cause? A catastrophic &lt;STRONG&gt;small file explosion&lt;/STRONG&gt; (creating 2.7 million partitions and 3.2 million tiny files) that completely drowned Spark in metadata overhead. Upgrading cluster sizes, running standard OPTIMIZE, and trying ZORDER barely made a dent because Spark was spending all its time just navigating physical directories.&lt;/P&gt;&lt;P&gt;We ultimately solved this by migrating completely to &lt;STRONG&gt;Delta Lake's Liquid Clustering&lt;/STRONG&gt;, which slashed our file count down to 18,000, removed directory overhead entirely, and dropped our total pipeline runtime down to just &lt;STRONG&gt;8 minutes&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I've shared the full, step-by-step optimization journey, including our exact benchmarking numbers for each failed attempt,&amp;nbsp; over on Medium.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt; &lt;STRONG&gt;&lt;A href="https://medium.com/@avinash.narala6814/how-a-databricks-partitioning-mistake-turned-a-12-minute-databricks-job-into-a-2-hour-nightmare-d51765126d29" target="_blank" rel="noopener"&gt;Read the Full Story on Medium&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;H3&gt;The Results&lt;/H3&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Metric&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Traditional Partitioning&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Liquid Clustering&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;&lt;STRONG&gt;Total Files&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;3.2 Million&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;&lt;STRONG&gt;18,000&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;&lt;STRONG&gt;Partition Directories&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;2.7 Million&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;&lt;STRONG&gt;Pipeline Runtime&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;~120 minutes&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;&lt;STRONG&gt;8 minutes&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;H3&gt;Key Takeaway&lt;/H3&gt;&lt;P&gt;The old rule of &lt;I&gt;"partition by the column you filter on"&lt;/I&gt; fails spectacularly on high-cardinality keys like IDs. If you are facing massive metadata overhead or slow merges, skip the cluster upgrades and switch to &lt;STRONG&gt;Liquid Clustering&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;I&gt;Have you run into similar small-file bottlenecks in your production environment? Let's discuss below!&lt;/I&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 19 Jun 2026 16:13:36 GMT</pubDate>
    <dc:creator>Avinash_Narala</dc:creator>
    <dc:date>2026-06-19T16:13:36Z</dc:date>
    <item>
      <title>How a Partitioning Mistake Turned a 12-Minute Databricks Job Into a 2-Hour Nightmare</title>
      <link>https://community.databricks.com/t5/community-articles/how-a-partitioning-mistake-turned-a-12-minute-databricks-job/m-p/159918#M1290</link>
      <description>&lt;P&gt;Hello Databricks Community!&lt;/P&gt;&lt;P&gt;I recently published a detailed breakdown on Medium about a real-world optimization nightmare we faced, and I wanted to share the core lessons learned with this group.&lt;/P&gt;&lt;P&gt;We had a highly efficient Delta table pipeline handling &lt;STRONG&gt;1.2 billion records&lt;/STRONG&gt; that completed its hourly incremental updates in just &lt;STRONG&gt;12 minutes&lt;/STRONG&gt;. In a bid to speed up specific queries, we made a seemingly logical choice: partitioning the table by a high-cardinality column (TransactionID).&lt;/P&gt;&lt;P&gt;Instead of speeding things up, this single layout choice turned our 12-minute job into a &lt;STRONG&gt;2-hour nightmare&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;The root cause? A catastrophic &lt;STRONG&gt;small file explosion&lt;/STRONG&gt; (creating 2.7 million partitions and 3.2 million tiny files) that completely drowned Spark in metadata overhead. Upgrading cluster sizes, running standard OPTIMIZE, and trying ZORDER barely made a dent because Spark was spending all its time just navigating physical directories.&lt;/P&gt;&lt;P&gt;We ultimately solved this by migrating completely to &lt;STRONG&gt;Delta Lake's Liquid Clustering&lt;/STRONG&gt;, which slashed our file count down to 18,000, removed directory overhead entirely, and dropped our total pipeline runtime down to just &lt;STRONG&gt;8 minutes&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;I've shared the full, step-by-step optimization journey, including our exact benchmarking numbers for each failed attempt,&amp;nbsp; over on Medium.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":backhand_index_pointing_right:"&gt;👉&lt;/span&gt; &lt;STRONG&gt;&lt;A href="https://medium.com/@avinash.narala6814/how-a-databricks-partitioning-mistake-turned-a-12-minute-databricks-job-into-a-2-hour-nightmare-d51765126d29" target="_blank" rel="noopener"&gt;Read the Full Story on Medium&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;H3&gt;The Results&lt;/H3&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;Metric&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Traditional Partitioning&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Liquid Clustering&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;&lt;STRONG&gt;Total Files&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;3.2 Million&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;&lt;STRONG&gt;18,000&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;&lt;STRONG&gt;Partition Directories&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;2.7 Million&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN&gt;&lt;STRONG&gt;Pipeline Runtime&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;~120 minutes&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;&lt;SPAN&gt;&lt;STRONG&gt;8 minutes&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;H3&gt;Key Takeaway&lt;/H3&gt;&lt;P&gt;The old rule of &lt;I&gt;"partition by the column you filter on"&lt;/I&gt; fails spectacularly on high-cardinality keys like IDs. If you are facing massive metadata overhead or slow merges, skip the cluster upgrades and switch to &lt;STRONG&gt;Liquid Clustering&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;I&gt;Have you run into similar small-file bottlenecks in your production environment? Let's discuss below!&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2026 16:13:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/community-articles/how-a-partitioning-mistake-turned-a-12-minute-databricks-job/m-p/159918#M1290</guid>
      <dc:creator>Avinash_Narala</dc:creator>
      <dc:date>2026-06-19T16:13:36Z</dc:date>
    </item>
  </channel>
</rss>

