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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
wc123
Helper I
Helper I

Query Time Outs

I have a query that i am running in SSMS that takes about 3-4 Minutes to finish executing. I bring that same query into powerbi using a native query and it never finishes executing. What is going on here and how can I make this not an issue.  Please help this is beyond frustrating.

4 REPLIES 4
v-dineshya
Community Support
Community Support

Hi @wc123 ,

Thank you for reaching out to the Microsoft Community Forum.

 

Hi @krishnakanth240  and @parry2k , Thank you for your prompt responses.

 

Power BI has a less default Timeout, It does not run your query like SSMS. It often runs it to get schema, to preview data, to validate metadata, during refresh and during relationship discovery. If you use Value.NativeQuery, Power BI may wrap it with extra SQL, this can break indexes prevent parallel plans. It Loads everything into memory, applies data type conversions and Compresses the model.

 

SSMS has No timeout by default. It streams results and minimal transformation

 

Please try below things to fix the issue.

1. Increase Power BI Timeout, In Power Query:

Source = Sql.Database(
"Server_name",
"Database_name",
[
Query = "YOUR QUERY",
CommandTimeout = #duration(0, 0, 30, 0)
]
)

Note: Above "30" indicates 30 minutes.

 

2. Use Value.NativeQuery

let
Source = Sql.Database("Server", "DB"),
Data = Value.NativeQuery(
Source,
"YOUR QUERY",
null,
[EnableFolding=false]
)
in
Data

 

3.Disable Power BI Preview Load, Power BI Desktop:

File --> Options --> Data Load.

Enable data preview to download in the background

Note: This prevents double execution.

 

Please refer below snap for connection time out for Power bi.

 

vdineshya_0-1776065682656.png

 

Please refer below snap for connection time out for SSMS.

 

vdineshya_1-1776065757911.png

 

 

I hope this information helps. Please do let us know if you have any further queries.

 

Regards,

Dinesh

 

Hi @wc123 ,

We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet. And, if you have any further query do let us know.

 

Regards,

Dinesh

krishnakanth240
Memorable Member
Memorable Member

Hi @wc123 

Power BI is not just running your query like SSMS and it might break query folding, adding transformations, and hitting the timeouts where it becomes much slower and never finishes. So, ensure query folding is enabled, moving logic to SQL View, and reducing the data with essential columns.

parry2k
Super User
Super User

@wc123 are you doing any further transformation in PQ? Do you see query folding happening?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.