<?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: Slow Query on Gateway but Fast on Database in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Slow-Query-on-Gateway-but-Fast-on-Database/m-p/4892965#M42534</link>
    <description>&lt;P&gt;what kind of power query has been implemented in the semantic model?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I mean, is it zero/low transformation power query and all the transformations happen on Hive side or there're many transformations?&lt;BR /&gt;in the second case have you checked if transformations are folding to the source?&lt;/P&gt;
&lt;P&gt;if it's not folding, transformations happen on the gateway side and they can be slow.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Dec 2025 11:06:21 GMT</pubDate>
    <dc:creator>R1k91</dc:creator>
    <dc:date>2025-12-04T11:06:21Z</dc:date>
    <item>
      <title>Slow Query on Gateway but Fast on Database</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Slow-Query-on-Gateway-but-Fast-on-Database/m-p/4890463#M42515</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our company has a server dedicated for Power BI On-Premises Data Gateway with 20 vCPU and 64 GB RAM. We have a little problem where Power BI Gateway performs refresh queries very slow especially to Hive tables. There's this one semantic model that queries to the Hive tables, the problem is, when I click refresh on the semantic model, it can take up to 15 minutes with a query limit of 50 rows. But when we check from the Hive side, the query only takes 3 seconds. From the Gateway perspective, the CPU usage never goes above 15% and memory usage rarely goes above 30%. So where is the bottleneck and how do I troubleshoot this? The problem only occurs to Hive. We're not getting these issues with Oracle, PostgreSQL, and MySQL databases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Tue, 02 Dec 2025 08:24:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Slow-Query-on-Gateway-but-Fast-on-Database/m-p/4890463#M42515</guid>
      <dc:creator>dave4667</dc:creator>
      <dc:date>2025-12-02T08:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Query on Gateway but Fast on Database</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Slow-Query-on-Gateway-but-Fast-on-Database/m-p/4890993#M42521</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1447168" data-lia-user-login="dave4667" class="lia-mention lia-mention-user"&gt;dave4667&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;This behaviour is relatively common when working with &lt;STRONG&gt;Hive via the On-Premises Data Gateway&lt;/STRONG&gt;, and it is usually not related to CPU or memory usage but rather to &lt;STRONG&gt;network latency, data serialisation, and lack of efficient query folding&lt;/STRONG&gt;. Let us analyse the main points:&lt;/DIV&gt;&lt;HR /&gt;&lt;H3&gt;&lt;STRONG&gt;Why is the query fast in Hive but slow through the Gateway?&lt;/STRONG&gt;&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;The Gateway does not execute the query directly&lt;/STRONG&gt;: It acts as a proxy, receiving data from Hive and sending it to the Power BI service.&lt;BR /&gt;Even if the query returns only 50 rows, Hive may send additional metadata or process via ODBC/JDBC, which introduces overhead.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Hive ODBC/JDBC driver performance&lt;/STRONG&gt;: Some drivers are not optimised for small operations and can have high initialisation latency.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Partial or no query folding&lt;/STRONG&gt;: If Power Query applies transformations that are not fully folded to Hive, the Gateway may process part of the logic locally.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Network between Gateway and Hive&lt;/STRONG&gt;: Even with sufficient CPU and RAM, bandwidth or latency can be the bottleneck.&lt;/LI&gt;&lt;/OL&gt;&lt;HR /&gt;&lt;H3&gt;&lt;STRONG&gt;How to diagnose and improve&lt;/STRONG&gt;&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Check the connection mode&lt;/STRONG&gt;:&lt;UL&gt;&lt;LI&gt;Are you using &lt;STRONG&gt;Import&lt;/STRONG&gt; or &lt;STRONG&gt;DirectQuery&lt;/STRONG&gt;?&lt;/LI&gt;&lt;LI&gt;In Import mode, the Gateway must load the data into the Power BI service, which can be slow if compression or conversion is involved.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Enable Query Diagnostics in Power BI Desktop&lt;/STRONG&gt;:&lt;UL&gt;&lt;LI&gt;This will show whether transformations are being folded to Hive or processed locally.&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://learn.microsoft.com/power-query/query-diagnostics" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/power-query/query-diagnostics&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Test with a simple query in Power Query&lt;/STRONG&gt;:&lt;UL&gt;&lt;LI&gt;For example, SELECT * LIMIT 50 without transformations. If it remains slow, the issue is likely with the driver or network.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Update the Hive ODBC/JDBC driver&lt;/STRONG&gt;:&lt;UL&gt;&lt;LI&gt;Older drivers often have performance issues.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Adjust Gateway settings for timeouts and concurrent connections&lt;/STRONG&gt;:&lt;UL&gt;&lt;LI&gt;In &lt;STRONG&gt;Gateway Settings&lt;/STRONG&gt;, increase the maximum number of concurrent connections for Hive.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Check compression and serialisation&lt;/STRONG&gt;:&lt;UL&gt;&lt;LI&gt;Hive may send data in Avro/Parquet format, but the Gateway converts it internally, which can be slow.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;HR /&gt;&lt;H3&gt;&lt;STRONG&gt;Best practices&lt;/STRONG&gt;&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;Where possible, create &lt;STRONG&gt;optimised views in Hive&lt;/STRONG&gt; to reduce transformations in Power Query.&lt;/LI&gt;&lt;LI&gt;Consider using &lt;STRONG&gt;DirectQuery&lt;/STRONG&gt; to avoid large data transfers, but test whether performance improves.&lt;/LI&gt;&lt;LI&gt;Install the Gateway &lt;STRONG&gt;as close as possible to the Hive cluster&lt;/STRONG&gt; to minimise network latency.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this response was helpful in any way, I’d gladly accept a &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;much like the joy of seeing a DAX measure work first time without needing another FILTER.&lt;/P&gt;&lt;P&gt;Please mark it as the correct solution. It helps other community members find their way faster (and saves them from another endless loop &lt;span class="lia-unicode-emoji" title=":cyclone:"&gt;🌀&lt;/span&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Dec 2025 17:36:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Slow-Query-on-Gateway-but-Fast-on-Database/m-p/4890993#M42521</guid>
      <dc:creator>Zanqueta</dc:creator>
      <dc:date>2025-12-02T17:36:41Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Query on Gateway but Fast on Database</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Slow-Query-on-Gateway-but-Fast-on-Database/m-p/4892965#M42534</link>
      <description>&lt;P&gt;what kind of power query has been implemented in the semantic model?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I mean, is it zero/low transformation power query and all the transformations happen on Hive side or there're many transformations?&lt;BR /&gt;in the second case have you checked if transformations are folding to the source?&lt;/P&gt;
&lt;P&gt;if it's not folding, transformations happen on the gateway side and they can be slow.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2025 11:06:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Slow-Query-on-Gateway-but-Fast-on-Database/m-p/4892965#M42534</guid>
      <dc:creator>R1k91</dc:creator>
      <dc:date>2025-12-04T11:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Query on Gateway but Fast on Database</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Slow-Query-on-Gateway-but-Fast-on-Database/m-p/4895845#M42587</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1447168" data-lia-user-login="dave4667" class="lia-mention lia-mention-user"&gt;dave4667&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out to the Microsoft Fabric Forum Community.&lt;/P&gt;
&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="500205" data-lia-user-login="R1k91" class="lia-mention lia-mention-user"&gt;R1k91&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="861055" data-lia-user-login="Zanqueta" class="lia-mention lia-mention-user"&gt;Zanqueta&lt;/a&gt;&amp;nbsp;Thanks for your inputs&lt;/P&gt;
&lt;P&gt;I hope the information provided by users was helpful. If you still have questions, please don't hesitate to reach out to the community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Dec 2025 11:27:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Slow-Query-on-Gateway-but-Fast-on-Database/m-p/4895845#M42587</guid>
      <dc:creator>v-priyankata</dc:creator>
      <dc:date>2025-12-08T11:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: Slow Query on Gateway but Fast on Database</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Slow-Query-on-Gateway-but-Fast-on-Database/m-p/4899476#M42625</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1447168" data-lia-user-login="dave4667" class="lia-mention lia-mention-user"&gt;dave4667&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope everything’s going smoothly on your end. I wanted to check if the issue got sorted. if you have any other issues please reach community.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Dec 2025 08:54:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Slow-Query-on-Gateway-but-Fast-on-Database/m-p/4899476#M42625</guid>
      <dc:creator>v-priyankata</dc:creator>
      <dc:date>2025-12-11T08:54:33Z</dc:date>
    </item>
  </channel>
</rss>

