cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
justinw Occasional Visitor
Occasional Visitor

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
Community Support
Community Support

Re: SQL Queries stall

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
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors