<?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 Databricks SQL: Check Join Row Counts Before Resizing the Warehouse in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/databricks-sql-check-join-row-counts-before-resizing-the/m-p/175640#M2807</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When a sales query runs slowly, inspect how many rows each join produces before changing compute size.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Consider a hypothetical retailer joining order lines to payments using &lt;/SPAN&gt;&lt;SPAN&gt;order_id&lt;/SPAN&gt;&lt;SPAN&gt;. One customer’s order has three product lines and two payment records. Joining these tables directly produces six rows for that order.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If the query then sums line amounts, each product line is counted twice. That extra processing can also make the query slower.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Azure Databricks query profiles show operator-level execution time, row counts, and memory usage, helping identify expensive operations and unexpected row growth.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For this fictional report, I would:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Open the query from &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;Query History&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, then select &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;See query profile&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Inspect the join’s input and output row counts.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Confirm the report’s intended grain: one row per order.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Aggregate order lines and payments separately to that grain before joining.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Validate totals and compare execution profiles under comparable conditions.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;Multiple matches can be intentional. The important check is whether the join preserves the meaning and grain of the report.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;What checks does your team use to distinguish legitimate join expansion from a join that inflates both processing work and business totals?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Reference: &lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/sql/user/queries/query-profile" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Azure Databricks query profile&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#Databricks #SQL #QueryOptimization&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 05 Nov 2026 01:19:46 GMT</pubDate>
    <dc:creator>amitsharma1707</dc:creator>
    <dc:date>2026-11-05T01:19:46Z</dc:date>
    <item>
      <title>Databricks SQL: Check Join Row Counts Before Resizing the Warehouse</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/databricks-sql-check-join-row-counts-before-resizing-the/m-p/175640#M2807</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When a sales query runs slowly, inspect how many rows each join produces before changing compute size.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Consider a hypothetical retailer joining order lines to payments using &lt;/SPAN&gt;&lt;SPAN&gt;order_id&lt;/SPAN&gt;&lt;SPAN&gt;. One customer’s order has three product lines and two payment records. Joining these tables directly produces six rows for that order.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If the query then sums line amounts, each product line is counted twice. That extra processing can also make the query slower.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Azure Databricks query profiles show operator-level execution time, row counts, and memory usage, helping identify expensive operations and unexpected row growth.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;For this fictional report, I would:&lt;/SPAN&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Open the query from &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;Query History&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, then select &lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN&gt;See query profile&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Inspect the join’s input and output row counts.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Confirm the report’s intended grain: one row per order.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Aggregate order lines and payments separately to that grain before joining.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;SPAN&gt;Validate totals and compare execution profiles under comparable conditions.&lt;/SPAN&gt;&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;Multiple matches can be intentional. The important check is whether the join preserves the meaning and grain of the report.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;What checks does your team use to distinguish legitimate join expansion from a join that inflates both processing work and business totals?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Reference: &lt;/SPAN&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/databricks/sql/user/queries/query-profile" target="_blank" rel="noopener"&gt;&lt;SPAN&gt;Azure Databricks query profile&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#Databricks #SQL #QueryOptimization&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Nov 2026 01:19:46 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/databricks-sql-check-join-row-counts-before-resizing-the/m-p/175640#M2807</guid>
      <dc:creator>amitsharma1707</dc:creator>
      <dc:date>2026-11-05T01:19:46Z</dc:date>
    </item>
  </channel>
</rss>

