Analyze query processing for Direct Lake semantic models
Power BI semantic models in Direct Lake mode read Delta tables directly from OneLake — unless they have to fall back to DirectQuery mode. Typical fallback reasons include memory pressures that can prevent loading of columns required to process a DAX query, and certain features at the data source might not support Direct Lake mode, like SQL views in a Warehouse and Lakehouse. In general, Direct Lake mode provides the best DAX query performance unless a fallback to DirectQuery mode is necessary. Because fallback to DirectQuery mode can impact DAX query performance, it's important to analyze query processing for a Direct Lake semantic model to identify if and how often fallbacks occur.
Analyze by using Performance analyzer
Performance analyzer can provide a quick and easy look into how a visual queries a data source, and how much time it takes to render a result.
Start Power BI Desktop. On the startup screen, select New > Report.
Select Get Data from the ribbon, then select Power BI semantic models.
In the OneLake data hub page, select the Direct Lake semantic model you want to connect to, and then select Connect.
Place a card visual on the report canvas, select a data column to create a basic report, and then on the View menu, select Performance analyzer.
In the Performance analyzer pane, select Start recording.
In the Performance analyzer pane, select Refresh visuals, and then expand the Card visual. The card visual doesn't cause any DirectQuery processing, which indicates the semantic model was able to process the visual’s DAX queries in Direct Lake mode.
If the semantic model falls back to DirectQuery mode to process the visual’s DAX query, you see a Direct query performance metric, as shown in the following image:
Analyze by using SQL Server Profiler
SQL Server Profiler can provide more details about query performance by tracing query events. It's installed with SQL Server Management Studio (SSMS). Before starting, make sure you have the latest version of SSMS installed.
Start SQL Server Profiler from the Windows menu.
In SQL Server Profiler, select File > New Trace.
In Connect to Server > Server type, select Analysis Services, then in Server name, enter the URL to your workspace, then select an authentication method, and then enter a username to sign in to the workspace.
Select Options. In Connect to database, enter the name of your semantic model and then select Connect. Sign in to Microsoft Entra ID.
In Trace Properties > Events Selection, select the Show all events checkbox.
Scroll to Query Processing, and then select checkboxes for the following events:
Event Description DirectQuery_Begin
DirectQuery_EndIf DirectQuery Begin/End events appear in the trace, the semantic model might have fallen back to DirectQuery mode. However, note that the presence of EngineEdition queries and possibly queries to check Object-Level Security (OLS) do not represent a fallback because the engine always uses DirectQuery mode for these non-query processing related checks. VertiPaq_SE_Query_Begin
VertiPaq_SE_Query_Cache_Match
VertiPaq_SE_Query_Cache_Miss
VertiPaq_SE_Query_EndVertiPaq storage engine (SE) events in Direct Lake mode are the same as for import mode. It should look like this:
Select Run. In Power BI Desktop, create a new report or interact with an existing report to generate query events. Review the SQL Server Profiler trace report for query processing events.
The following image shows an example of query processing events for a DAX query. In this trace, the VertiPaq storage engine (SE) events indicate that the query was processed in Direct Lake mode.