<?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 Why is Embedded so slow? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Why-is-Embedded-so-slow/m-p/524134#M16150</link>
    <description>&lt;P&gt;I have an embedded report that takes roughly 45 seconds to filter/drill down, deeming it entirely unusable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;It is only using ~1500 rows of data&lt;/LI&gt;&lt;LI&gt;The SQL Query feeding it uses a number of joins across approximately 12 tables&lt;/LI&gt;&lt;LI&gt;There are numerous filters, bookmarks, etc.&lt;/LI&gt;&lt;LI&gt;It's using RLS&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Which, if any, of these factors could be causing the speed degradation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started by looking at the relevant SQL Queries in the Azure Query Performance Insight tool. Attached is a sample of one SQL Query. And it appears that one of these is being executed for each pie chart in the report (there are ~12 such pie charts on each report page). This query took 47 seconds to run:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;PRE&gt;SELECT 
TOP (1000001) [t0].[racekey],
COUNT_BIG([t0].[employeeid])
 AS [a0]
FROM 
(

SELECT [userid],[datasetname],[timestamp],[datasetid],[location],[department],[title],[gender],[eeo1],[perf],[grade],
CAST([rangemin] AS FLOAT)
 AS [rangemin],
CAST([rangemid] AS FLOAT)
 AS [rangemid],
CAST([rangemax] AS FLOAT)
 AS [rangemax],[race],[latest],[employeename],[employeeid],
CAST([annualizedbase] AS FLOAT)
 AS [annualizedbase],
CAST([incentive] AS FLOAT)
 AS [incentive],
CAST([lti] AS FLOAT)
 AS [lti],[division],[jobgroup],[jobfamily],[birthdate],[dateinjob],[tenuredate],[flsa],[ptft],[benefits],[supervisor],[evalpoints],[country],[currency],[disabled],[education],[lgbt],[religion],[marital],[email],[jobcode],
CAST([overtime] AS FLOAT)
 AS [overtime],[edu],[racekey],[eeo],[performance],[value],[url],[ageflag],[ageflag value],[ageflag url],[disabled value],[disabled url],[minority value],[minority url],[timestampedit],[filterkey]
FROM 
(
(SELECT DISTINCT ai.value AS 'ageflag value', ai.url AS 'ageflag url', dim.value AS 'disabled value', dim.url AS 'disabled url', mi.value AS 'minority value', mi.url AS 'minority url', gi.value, gi.url, d.userid, datasetname, timestamp, d.timestampedit, latest, di.datasetid, employeename, employeeid, title, annualizedbase, grade, rangemin, rangemid, rangemax, incentive, lti, department, division, jobgroup, jobfamily, location, gender, di.race, birthdate, dateinjob, tenuredate, flsa, ptft, eeo1, perf, benefits, supervisor, evalpoints, country, currency, disabled, di.education, lgbt, religion, marital, email, jobcode, overtime, edu, rm.race AS racekey, eem.eeo, pm.performance, di.ageflag, filterkey FROM datasets D full outer join datasetitems DI on d.datasetid = di.datasetid LEFT JOIN education e ON di.education = e.education FULL OUTER JOIN edumaster em ON e.educationkey = em.eduid LEFT JOIN races r ON di.race = r.race FULL OUTER JOIN racemaster rm ON r.racekey = rm.racekeyid LEFT JOIN eeos ee ON di.eeo1 = ee.eeo FULL OUTER JOIN eeomaster eem ON ee.eeokey = eem.eeokeyid INNER JOIN performance p ON di.perf = p.performance INNER JOIN perfmaster pm ON p.performancekey = pm.performanceid AND p.userid = d.userid LEFT JOIN ceo ON di.employeeid = ceo.ceoid LEFT JOIN genderimg gi ON di.gender = gi.value LEFT JOIN ageimg ai ON di.ageflag = ai.value LEFT JOIN disabledimg dim ON di.disabled = dim.value LEFT JOIN minorityimg mi ON di.minority = mi.value)
)
 AS [t0]
)
 AS [t0]
WHERE 
(
([t0].[userid] = N'1ad3c8c0-7ce9-45c3-9ca6-cca56a3fc2a0')
 AND 
(
([t0].[gender] IN (N'Female',N'Male'))
)
)

GROUP BY [t0].[racekey]&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 24 Sep 2018 20:26:09 GMT</pubDate>
    <dc:creator>ats1958</dc:creator>
    <dc:date>2018-09-24T20:26:09Z</dc:date>
    <item>
      <title>Why is Embedded so slow?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Why-is-Embedded-so-slow/m-p/524134#M16150</link>
      <description>&lt;P&gt;I have an embedded report that takes roughly 45 seconds to filter/drill down, deeming it entirely unusable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;It is only using ~1500 rows of data&lt;/LI&gt;&lt;LI&gt;The SQL Query feeding it uses a number of joins across approximately 12 tables&lt;/LI&gt;&lt;LI&gt;There are numerous filters, bookmarks, etc.&lt;/LI&gt;&lt;LI&gt;It's using RLS&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Which, if any, of these factors could be causing the speed degradation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I started by looking at the relevant SQL Queries in the Azure Query Performance Insight tool. Attached is a sample of one SQL Query. And it appears that one of these is being executed for each pie chart in the report (there are ~12 such pie charts on each report page). This query took 47 seconds to run:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;PRE&gt;SELECT 
TOP (1000001) [t0].[racekey],
COUNT_BIG([t0].[employeeid])
 AS [a0]
FROM 
(

SELECT [userid],[datasetname],[timestamp],[datasetid],[location],[department],[title],[gender],[eeo1],[perf],[grade],
CAST([rangemin] AS FLOAT)
 AS [rangemin],
CAST([rangemid] AS FLOAT)
 AS [rangemid],
CAST([rangemax] AS FLOAT)
 AS [rangemax],[race],[latest],[employeename],[employeeid],
CAST([annualizedbase] AS FLOAT)
 AS [annualizedbase],
CAST([incentive] AS FLOAT)
 AS [incentive],
CAST([lti] AS FLOAT)
 AS [lti],[division],[jobgroup],[jobfamily],[birthdate],[dateinjob],[tenuredate],[flsa],[ptft],[benefits],[supervisor],[evalpoints],[country],[currency],[disabled],[education],[lgbt],[religion],[marital],[email],[jobcode],
CAST([overtime] AS FLOAT)
 AS [overtime],[edu],[racekey],[eeo],[performance],[value],[url],[ageflag],[ageflag value],[ageflag url],[disabled value],[disabled url],[minority value],[minority url],[timestampedit],[filterkey]
FROM 
(
(SELECT DISTINCT ai.value AS 'ageflag value', ai.url AS 'ageflag url', dim.value AS 'disabled value', dim.url AS 'disabled url', mi.value AS 'minority value', mi.url AS 'minority url', gi.value, gi.url, d.userid, datasetname, timestamp, d.timestampedit, latest, di.datasetid, employeename, employeeid, title, annualizedbase, grade, rangemin, rangemid, rangemax, incentive, lti, department, division, jobgroup, jobfamily, location, gender, di.race, birthdate, dateinjob, tenuredate, flsa, ptft, eeo1, perf, benefits, supervisor, evalpoints, country, currency, disabled, di.education, lgbt, religion, marital, email, jobcode, overtime, edu, rm.race AS racekey, eem.eeo, pm.performance, di.ageflag, filterkey FROM datasets D full outer join datasetitems DI on d.datasetid = di.datasetid LEFT JOIN education e ON di.education = e.education FULL OUTER JOIN edumaster em ON e.educationkey = em.eduid LEFT JOIN races r ON di.race = r.race FULL OUTER JOIN racemaster rm ON r.racekey = rm.racekeyid LEFT JOIN eeos ee ON di.eeo1 = ee.eeo FULL OUTER JOIN eeomaster eem ON ee.eeokey = eem.eeokeyid INNER JOIN performance p ON di.perf = p.performance INNER JOIN perfmaster pm ON p.performancekey = pm.performanceid AND p.userid = d.userid LEFT JOIN ceo ON di.employeeid = ceo.ceoid LEFT JOIN genderimg gi ON di.gender = gi.value LEFT JOIN ageimg ai ON di.ageflag = ai.value LEFT JOIN disabledimg dim ON di.disabled = dim.value LEFT JOIN minorityimg mi ON di.minority = mi.value)
)
 AS [t0]
)
 AS [t0]
WHERE 
(
([t0].[userid] = N'1ad3c8c0-7ce9-45c3-9ca6-cca56a3fc2a0')
 AND 
(
([t0].[gender] IN (N'Female',N'Male'))
)
)

GROUP BY [t0].[racekey]&lt;/PRE&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 24 Sep 2018 20:26:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Why-is-Embedded-so-slow/m-p/524134#M16150</guid>
      <dc:creator>ats1958</dc:creator>
      <dc:date>2018-09-24T20:26:09Z</dc:date>
    </item>
  </channel>
</rss>

