<?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 Re: Performance issue when reading data from a view. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106696#M42555</link>
    <description>&lt;P&gt;We dont have access to the table level directly . Its only region level views are accessible and we union them to get combine data.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jan 2025 17:46:27 GMT</pubDate>
    <dc:creator>sensanjoy</dc:creator>
    <dc:date>2025-01-22T17:46:27Z</dc:date>
    <item>
      <title>Performance issue when reading data from a view.</title>
      <link>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106363#M42459</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;We are facing some performance issue and I need your help to know what could be the best approach to follow here.&lt;/P&gt;&lt;P&gt;Existing:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&amp;nbsp;For each region, we have view(Reg1_View,Reg2_View..) to pull data from table( we don't have direct access to table).&lt;/LI&gt;&lt;LI&gt;And then we are combining data from all view into another view named All_Reg_View(Reg1_View union all Reg2_View..).&lt;/LI&gt;&lt;LI&gt;Using the combining view All_Reg_View in join condition with other view in notebook and create target delta table.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="View_Vs_Staging_Table.png" style="width: 518px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/14237iCCD5FB19F28B1D5B/image-dimensions/518x158?v=v2" width="518" height="158" role="button" title="View_Vs_Staging_Table.png" alt="View_Vs_Staging_Table.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;All views are constructed same way and we are dealing wit&lt;SPAN&gt;h billions of data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Proposed approach:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create one staging table(truncate &amp;amp; load) replacing the combined view(All_Reg_View) by performing union of all views.&lt;/LI&gt;&lt;LI&gt;Partition the stg table based on region.&lt;/LI&gt;&lt;LI&gt;Use the stg tables in joining to create target delta table.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Please let me know your thought.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 15:49:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106363#M42459</guid>
      <dc:creator>sensanjoy</dc:creator>
      <dc:date>2025-01-20T15:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue when reading data from a view.</title>
      <link>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106364#M42460</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/34319"&gt;@sensanjoy&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Could you please advise what kind of performance issue are you facing? Is it slowness while querying the views?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 16:03:07 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106364#M42460</guid>
      <dc:creator>Alberto_Umana</dc:creator>
      <dc:date>2025-01-20T16:03:07Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue when reading data from a view.</title>
      <link>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106365#M42461</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/106294"&gt;@Alberto_Umana&lt;/a&gt;&amp;nbsp; Yes, during query execution and joining back with other views resulting more time. We are building target table by performing joining between views created like this way(combining multiple region views).&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 16:30:36 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106365#M42461</guid>
      <dc:creator>sensanjoy</dc:creator>
      <dc:date>2025-01-20T16:30:36Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue when reading data from a view.</title>
      <link>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106380#M42469</link>
      <description>&lt;P&gt;To address the performance challenges associated with &lt;STRONG&gt;All_Reg_View&lt;/STRONG&gt;, I propose replacing it with a &lt;STRONG&gt;partitioned staging table&lt;/STRONG&gt;. This change will significantly enhance query efficiency, simplify execution plans, and prepare the pipeline for future scalability.&lt;/P&gt;&lt;H3&gt;Proposed Solution&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create a Partitioned Staging Table&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Truncate and Load&lt;/STRONG&gt;: Materialize data from regional views into a dedicated staging table. Use a &lt;STRONG&gt;TRUNCATE&lt;/STRONG&gt; operation followed by a fresh load to ensure efficient data refresh.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Partitioning&lt;/STRONG&gt;: Partition the staging table by region to enable faster and more efficient filtering during queries.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Replace All_Reg_View in Joins&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Utilize the staging table for downstream joins. This eliminates runtime union operations by pre-aggregating data during the staging process, simplifying execution plans and reducing query overhead.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;This solution ensures more robust and efficient data processing while supporting the pipeline's long-term goals.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 18:52:48 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106380#M42469</guid>
      <dc:creator>fmadeiro</dc:creator>
      <dc:date>2025-01-20T18:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue when reading data from a view.</title>
      <link>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106529#M42510</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/137844"&gt;@fmadeiro&lt;/a&gt;&amp;nbsp;. We are doing union all between all region like&amp;nbsp;&lt;SPAN&gt;Reg1_View union all Reg2_View..Regn_View to get the combined dataset into stg table. Is there any other efficient way to do it!!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 17:44:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106529#M42510</guid>
      <dc:creator>sensanjoy</dc:creator>
      <dc:date>2025-01-21T17:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue when reading data from a view.</title>
      <link>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106547#M42516</link>
      <description>&lt;P&gt;Does any table hold data of all region&amp;nbsp;&lt;BR /&gt;1. if yes. Get a Materialized view created (replacing all_reg_view)&lt;BR /&gt;&lt;BR /&gt;2. i see you already tried creating a staging table replacing the&amp;nbsp;all_reg_view.&amp;nbsp;&lt;BR /&gt;Try creating cluster key along with partition.&lt;/P&gt;&lt;P&gt;Cluster key on the region (joining columns) and partition on some date column if available.&lt;BR /&gt;&lt;BR /&gt;3. Analyze the other views for performance which you are joining with All_reg_view.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 19:29:02 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106547#M42516</guid>
      <dc:creator>SharathAbh93</dc:creator>
      <dc:date>2025-01-21T19:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: Performance issue when reading data from a view.</title>
      <link>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106696#M42555</link>
      <description>&lt;P&gt;We dont have access to the table level directly . Its only region level views are accessible and we union them to get combine data.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jan 2025 17:46:27 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/performance-issue-when-reading-data-from-a-view/m-p/106696#M42555</guid>
      <dc:creator>sensanjoy</dc:creator>
      <dc:date>2025-01-22T17:46:27Z</dc:date>
    </item>
  </channel>
</rss>

