Forum Discussion
difference between Live connection from semantic model and direct query
- 9 months ago
Hi ahmedshalabyy12 ,
When you connect to a semantic model using a live connection, the report is querying a model that is already loaded into memory and optimized by the VertiPaq engine. All of the data is preprocessed during refresh, so when a user interacts with the report, Power BI only has to run relatively lightweight DAX queries against data that is already cached and indexed, which is why it feels very fast.
DirectQuery works differently because nothing is cached in advance. Every interaction in the report sends a query back to the underlying data source, such as SQL Server, which means performance now depends on the speed and load of that external system, along with network latency. This is why DirectQuery can feel noticeably slower in comparison. The reason your report switches to DirectQuery when you bring in a second semantic model is simply because Power BI only supports a single live connection in a report. As soon as you try to combine more than one model, the system has to use a composite approach, which requires DirectQuery behavior so that both sources can be queried at runtime. So nothing is wrong in your setup. It is just how the platform currently works.
Best Regards,
Tejaswi.
Community Support - 9 months ago
Hey ahmedshalabyy12 ,
When you connect Power BI to a semantic model, it helps to understand how Live Connection and DirectQuery work, and why Live Connection is almost always faster.
Live Connection :- A Live Connection is used when you connect to an Analysis Services model or a Power BI semantic model that already exisits in the service. In this setup -
- All queries are handled by VertiPaq, Power BI's in memory engine, which is extremely fast and optimized for analytics.
- Power BI Desktop does not import the data and it does no send queries back to the original data souces.
- Since the semantic model already stores data in a compressed in memory format, results come back almost instantly.
This is why report using a Live Connection usually feel very responsive.
DirectQuery :- DirectQuery works differently
- Power BI does not load data into memory.
- Every visual generates a query that gets sent directly to the underlying database such as SQL Server , Synapase etc.
- Performance depends entirely in that external system its speed, the network, and how efficiently it can process the query.
Even well tuned databases can not match the speed of VertiPaq, which is why DirectQuery reports tent to be slower and more sensitive to complex visuals or filters.
When you use more than one semantic model in the same Power BI report, Power BI can no longer operate in Live Connection mode because Live Connection only supports a single semantic model at a time. To accommodate multiple models, Power BI automatically switches to DirectQuery over a semantic model (DQ over AS), which allows the report to query each model individually rather then maintaining a single live in memory connection.
I hope this clears up your doubt. If you have any further questions or need additional clarification, feel free to ask !!For more information - What's the difference between live connections and DirectQuery? - Power BI | Microsoft Learn
Power BI Get Data: Import vs. DirectQuery vs. Live
Thank You
I think it would be more correct to ask your question in the Power BI service forum. If you don't get the help you need in this forum then consider asking it again in the other forum.