<?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: DAX Studio and SQL profiler in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2496158#M68872</link>
    <description>&lt;P&gt;If you want you can show a sanitized version of your Power Query code.&amp;nbsp; Unless you are doing lots of merge operations the M transforms usually take much less time than the actual source query. In any case you can use the Power Query Diagnostics options to figure that out.&lt;/P&gt;</description>
    <pubDate>Thu, 05 May 2022 13:27:19 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2022-05-05T13:27:19Z</dc:date>
    <item>
      <title>DAX Studio and SQL profiler</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495625#M68825</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I ran a refresh of a dataset&amp;nbsp; for the first time. It took 4.5 hours.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The main query in this is a view in SQLServer, being an aggregate on a table. When I run this view in SQLServer it takes 40 minutes, going from 1.3 billion rows to 9 million.&lt;BR /&gt;So refreshing takes long,also the second refresh. 4 hours. Incremental refresh keeps 4 years of history, refreshes the last 13 months (based on creation-date), but only if changed (detect data change on last-change-date).&lt;BR /&gt;&lt;BR /&gt;Becaise refresh takes so long I use SQL Profiler in DAX Studio for the first time. Connecting to the shared dataset in the service goes fine, but once I start SQL Profiler I get an error&lt;BR /&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;It says trace with id doesn't exist in the server or the user is not authorized for having access to the object.&lt;BR /&gt;&lt;BR /&gt;How to solve this?&lt;BR /&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Regards&lt;BR /&gt;Ron&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 09:15:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495625#M68825</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-05T09:15:00Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Studio and SQL profiler</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495829#M68837</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;if I were you I would start with SQL query first. Why does it take 40 minutes to run a query ? Are the SQL tables missing any index? How can the SQL query be optimized.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 10:59:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495829#M68837</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2022-05-05T10:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Studio and SQL profiler</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495882#M68841</link>
      <description>&lt;P&gt;agree with&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp; - you should focus on the Power Query part, not on DAX Studio.&amp;nbsp; Also be aware that you are dangerously close to hitting the hard limit of 300 minutes - after that any dataset or dataflow refresh on the service will be killed. You want to get your duration down to not more than 2.5 hrs (to be on the safe side). Keep in mind that your refresh is blocking a renderer for the entire time, which means that renderer is not available for other users either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Read about bootstrapping for incremental refresh partitions.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 11:43:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495882#M68841</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-05-05T11:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Studio and SQL profiler</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495905#M68845</link>
      <description>&lt;P&gt;I completely agree&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="24978" data-lia-user-login="smpa01" class="lia-mention lia-mention-user"&gt;smpa01&lt;/a&gt;&amp;nbsp;. Just ran the view again in SQLServer. Took 23 minutes. But we are planning to add an index. The main issue for now is that I get that SQL Profiler error. So I can't get insights in why it takes so long.&lt;BR /&gt;&lt;BR /&gt;Furthermore I will dive into bootstrapping. Never heard of it &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 11:44:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495905#M68845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-05T11:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Studio and SQL profiler</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495909#M68847</link>
      <description>&lt;P&gt;&lt;A href="https://docs.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-xmla" target="_blank"&gt;Advanced incremental refresh and real-time data with the XMLA endpoint in Power BI - Power BI | Microsoft Docs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 11:46:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495909#M68847</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-05-05T11:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Studio and SQL profiler</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495961#M68850</link>
      <description>&lt;P&gt;Thnx, is on my read list. Is there something else then SQL Profiler to get insight in why refreshing takes so long?&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 12:08:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495961#M68850</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-05T12:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Studio and SQL profiler</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495991#M68853</link>
      <description>&lt;P&gt;Use SSMS and examine the actual query execution plan. It will even suggest indexes for you.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 12:22:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2495991#M68853</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-05-05T12:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Studio and SQL profiler</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2496049#M68862</link>
      <description>&lt;P&gt;I will&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;but I presume refreshing does more than only running the query in SQL ...&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 12:46:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2496049#M68862</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-05T12:46:51Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Studio and SQL profiler</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2496158#M68872</link>
      <description>&lt;P&gt;If you want you can show a sanitized version of your Power Query code.&amp;nbsp; Unless you are doing lots of merge operations the M transforms usually take much less time than the actual source query. In any case you can use the Power Query Diagnostics options to figure that out.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 13:27:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2496158#M68872</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2022-05-05T13:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Studio and SQL profiler</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2496352#M68887</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt; once the index is sorted, and the SQL query is still slow, start dissecting it in parts.&lt;/P&gt;
&lt;P&gt;There are lots of known performance optimization techniques within SQL (one syntax is better than other performance-wise for the same output) that can be used.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you still have issues,&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/tagged/sql-server" target="_self"&gt;stack-Sql-server&lt;/A&gt;&amp;nbsp; will rescue out, as it did for me many many many times.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One more thing to remember, it might be possible that a native SQL query that runs on SSMS in 3 minutes, PQ might return that query result in more than what SSMS takes. (I don't know why and I struggled with that a lot when I started playing out with large SQL tables). SO in that case, I learnt that the sever-side query needs to be &lt;STRONG&gt;super-optimized&amp;nbsp;&lt;/STRONG&gt;in order for PQ to not time out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, you might have a choice to bring the whole SQL table `select * from tbl` and use PQ syntax to manipulate the table (to preserve the PQ Query Folding) which will be even more time consuming (from my experience) and I will advise against it (speaking from my bitter experience).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Is there something else then SQL Profiler to get insight in why refreshing takes so long? -&amp;nbsp;&lt;/STRONG&gt;I am not sure but try Fiddler.&lt;/P&gt;</description>
      <pubDate>Thu, 05 May 2022 14:51:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Studio-and-SQL-profiler/m-p/2496352#M68887</guid>
      <dc:creator>smpa01</dc:creator>
      <dc:date>2022-05-05T14:51:45Z</dc:date>
    </item>
  </channel>
</rss>

