Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
justinw
New Member

SQL Queries stall

Hi Folks,

 

I have a function that calls a simple sql query to get 1 row based on the value in a column.

 

"= ( somenumber as number )
=> let
numberasastring = Number.ToText(somenumber ),
Source = Sql.Database("server", "database", [Query="SELECT TOP 1 * FROM DB WHERE " & numberasastring  & "= thenumberinsql"])
in
    Source"

 

This is fairly slow (40 records per second or so, and the SQL Server is mostly idle the whole time) but it does work, however I seem to have issues where the queries just stop executing all together after loading for some time.

 

Ive connected SQL Profiler to powerbi desktop to try and see whats going on, but its just not doing anything.

 

Is there some other best practice for getting row level data from SQL for each row in a table in powerbi?

 

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @justinw 

Please check these documents

Speeding up power query

Query Folding in Power Query to Improve Performance

 

Best Regards
Maggie

 

Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors