Hi,
I am running the following MDX query and I think the query runs slow, it takes 8 seconds for 28462 rows and 9 columns.
The raw fact data is about 1.000.000 rows containing data on a monthly base over two years (24 months).
According to my SQL Profile trace the formula engine takes 99% of the time to execute, the storage engine only 1%.
I allready did the following:
1. Usage Based Optimization Aggregation and checked if the aggregation is used in SQL Profiler (this is the case).
2. Tried to rewrite the MDX in differente way's.
3. Set NON EMPTY BEHAVIOR on the calculated measure.
4. Checked the configratution of my DateTime dimension
5. Checked attribute relationships
According to this article: https://sqldusty.com/2014/03/07/do-you-know-why-your-mdx-query-is-slow/ my MDX query is not optimal because the formula engine takes most of the time calculating the results.
At the moment I don't know why it's taking 8 seconds and what I can do to improve the performance.
The query should run withing preferably <= 3 seconds so the SSRS reports is available within an acceptable time.
The server has 4 vCores + 24GB Memory.
MDX Query
SELECT NON EMPTY
{
[Measures].[Aantal Prognose t/m], --YTD Measure
[Measures].[Omzet Prognose t/m], --YTD Measure
[Measures].[Aantal Prognose Vorig Jaar t/m], --PARALLELPERIOD Measure
[Measures].[Omzet Prognose Vorig Jaar t/m] --PARALLELPERIOD Measure
}
On 0,
NON EMPTY
[Opendatum].[H - Openjaar - Openperiode].[Openperiode Omschrijving]
*
[Specialisme].[Specialisme].[Specialisme].Members
*
[Zorgactiviteit].[H - Tarieftypegroep - Tarieftype - Declaratie].[Declaratie].Members
*
[Zorgproduct].[Zorgproduct].[Zorgproduct].Members
*
[DBCDiagnose].[H - Diagnosegroep - Diagnose].[Diagnose].Members
ON 1
FROM Productie
WHERE
([Opendatum].[Openjaar Periode Nummer].&[201808],[Omzetprognosegroep].[Omzetprognose Groep1].&[Overige productie])
Defintion of the measures used in the MDX query:
Measure: "Aantal prognose t/m"
AGGREGATE(YTD([Opendatum].[H - Openjaar - Openperiode - Opendatum].CurrentMember),
[Measures].[Aantal Prognose])
Measure: "Omzet prognose t/m"
AGGREGATE(YTD([Opendatum].[H - Openjaar - Openperiode - Opendatum].CurrentMember),
[Measures].[Omzet Prognose])
Measure: "Aantal Prognose Vorig Jaar t/m"
(PARALLELPERIOD([Opendatum].[H
- Openjaar - Openperiode - Opendatum].[Openjaar],1,[Opendatum].[H - Openjaar - Openperiode - Opendatum]),[Measures].[Aantal Prognose t/m])
Measure: "Omzet Prognose Vorig Jaar t/m"
(PARALLELPERIOD([Opendatum].[H - Openjaar -
Openperiode - Opendatum].[Openjaar],1,[Opendatum].[H - Openjaar - Openperiode - Opendatum]),[Measures].[Omzet Prognose t/m])