Troubleshooting performance problems with SQL Server Analysis Services (SSAS) can be frustrating, especially for data professionals who are new to the platform. To identify and resolve SSAS performance challenges quickly and correctly, you must understand where potential bottlenecks might lie and what metrics help identify the problem areas. In the SentryOne webinar "Getting Peak Performance for SQL Server Analysis Services (SSAS)", SentryOne Director of Sales Steve Wright discusses querying and processing in SSAS and describes how to identify bottlenecks when a query runs. He also demonstrates how SentryOne BI Sentry can help efficiently troubleshoot and resolve SSAS performance problems.
Querying and processing activities affect SSAS performance—whether you’re using Multidimensional mode or Tabular mode. Many of the same concepts and best practices applied to queries and backups in relational databases such as SQL Server can be applied to or used to understand querying and processing in SSAS.
“If you understand SQL Server best practices, it makes it easier to translate what you’re working with and seeing when trying to troubleshoot issues in SSAS.”
– Steve Wright, SentryOne
When performing queries, SSAS uses two primary engines: the formula engine and the storage engine. Either engine can be the source of a performance bottleneck; troubleshooting identifies which engine is the problem. The table below breaks down the primary features of each type of engine.
The first thing you need to determine when looking at performance problems is whether processing activities are happening at the same time as querying activities. Once you've ruled that out, SQL Server Profiler trace events can determine which query engine—formula or storage—is creating the bottleneck. The following table provides details on the Profiler trace events that are most important when troubleshooting SSAS performance challenges.
|Profiler Trace Event||Trace Event Indicators|
|Command Begin/End||Processing commands begin and end|
|Query Begin/End||Queries begin and end|
|Query Subcube/ Verbose||Duration the formula engine is querying to the storage engine (Multidimensional mode)|
|Progress Report Begin/End||Begin and end of file reads (Multidimensional mode)|
|Get Data From Aggregation||Time spent getting data from aggregations. This data is stored, pre-calculated data typically needed to handle the workload in the environment (Multidimensional mode)|
|VeritPaq SE Query Begin/End||Duration the formula engine is querying to the storage engine (Tabular mode)|
|Direct Query Begin/End||Time spent querying back to the relational data source for the data|
To determine which engine is the source of the problem, add up the cumulative durations indicated in Query Subcube/Verbose, Progress Report Begin/End, Get Data from Aggregation, VertiPaq SE Query Begin/End, and Direct Query End and compare to the Query Begin/End total time.
If the total duration is:
In addition to understanding which query engine is affecting performance, it’s essential to identify specific query and system attributes that are contributing to performance problems.
Although SQL Server Performance Monitor (PerfMon) and other tools offer many metrics useful in identifying performance problems, SentryOne’s BI Sentry helps IT teams identify performance problems in a way that they can drill down to both find and resolve the cause of the issues.
BI Sentry continuously collects and stores metrics so that you can use historical information in an investigation. The dashboard (shown below) allows you to correlate multiple metrics across time frames, simplifying your view into potential problem areas.
BI Sentry Dashboard
“In BI Sentry, you can go back at any point in time to see what was going on; you don’t have to be looking at the server when the problem is occurring to investigate it.”
– Steve Wright, SentryOne
From the dashboard, you can drill down into additional information that can be useful in troubleshooting. For example, BI Sentry makes it easy to identify whether the formula engine or the storage engine is the problem by displaying the percentage of time a query spends within each engine, as well as raw counter information.
Another useful tool is an Outlook-style calendar view that shows all queries, processes, and other events that occurred in SSAS. This calendar can help identify potential resource conflicts as well as failed events that might have affected performance.
BI Sentry Calendar View
In some cases, the identified performance problems involve query optimization. When MDX or DAX query optimization is necessary, there are three primary factors to consider: