![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
| INF: How to Increase the Speed of MDX Queries that Contain the NON EMPTY |
#3
| |||
| |||
|
|
Hi Ruby, Can you describe the dimensions and MDX query that generate the 2 million rows - is it multiple cross-joins? Also, does it involve calculated measures, in which case this MS KB article may help: http://support.microsoft.com/default...b;en-us;304137 INF: How to Increase the Speed of MDX Queries that Contain the NON EMPTY Keyword Article ID : 304137 Last Review : July 15, 2004 Revision : 1.1 This article was previously published under Q304137 SUMMARY In some cases, a query slows down considerably when you use both the NON EMPTY keyword on an axis of a Multidimensional Expression together with a calculated member. This article describes how you can optimize a query, by using the Non Empty Behavior property for the calculated member. ... - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#4
| |||
| |||
|
|
Hi Ruby, Can you describe the dimensions and MDX query that generate the 2 million rows - is it multiple cross-joins? Also, does it involve calculated measures, in which case this MS KB article may help: http://support.microsoft.com/default...b;en-us;304137 INF: How to Increase the Speed of MDX Queries that Contain the NON EMPTY Keyword Article ID : 304137 Last Review : July 15, 2004 Revision : 1.1 This article was previously published under Q304137 SUMMARY In some cases, a query slows down considerably when you use both the NON EMPTY keyword on an axis of a Multidimensional Expression together with a calculated member. This article describes how you can optimize a query, by using the Non Empty Behavior property for the calculated member. ... - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#5
| |||
| |||
|
| WITH |
#6
| |||
| |||
|
|
Unfortunately, since the calculated members are not measures, the Non Empty Behavior property won't help here. There may be other options with AS 2005, but below is an approach for AS 2000 (assuming that all Measures are empty for cells with no underlying fact data): WITH Set [CompanySet] as '{[Company].[All Company].[Microsoft], [Company].[All Company].[Apple]}' MEMBER [Company].Selection as 'Sum([CompanySet])' Set [DateSet] as '{[Date].[All Date].[2005].[1].[1].[1]: [Date].[All Date].[2005].[4].[12].[1]}' MEMBER [Date].DateRange as 'Sum([DateSet])' Set [SectorSet] as '{[Sector].[All Sector].[English], [Sector].[All Sector].[Spanish]}' MEMBER [Sector].SectorOp as 'Sum([SectorSet])' SELECT Non Empty [Measures].allmembers ON COLUMNS, NonEmptyCrossJoin( [program].[operatortype].Members, [Product].[product].Members, [CompanySet], [DateSet], [SectorSet], 2) on rows FROM [ADV_SMALL] WHERE ([Date].DateRange, [Sector].SectorOp, [Company].Selection) - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
#7
| |||
| |||
|
|
Unfortunately, since the calculated members are not measures, the Non Empty Behavior property won't help here. There may be other options with AS 2005, but below is an approach for AS 2000 (assuming that all Measures are empty for cells with no underlying fact data): WITH Set [CompanySet] as '{[Company].[All Company].[Microsoft], [Company].[All Company].[Apple]}' MEMBER [Company].Selection as 'Sum([CompanySet])' Set [DateSet] as '{[Date].[All Date].[2005].[1].[1].[1]: [Date].[All Date].[2005].[4].[12].[1]}' MEMBER [Date].DateRange as 'Sum([DateSet])' Set [SectorSet] as '{[Sector].[All Sector].[English], [Sector].[All Sector].[Spanish]}' MEMBER [Sector].SectorOp as 'Sum([SectorSet])' SELECT Non Empty [Measures].allmembers ON COLUMNS, NonEmptyCrossJoin( [program].[operatortype].Members, [Product].[product].Members, [CompanySet], [DateSet], [SectorSet], 2) on rows FROM [ADV_SMALL] WHERE ([Date].DateRange, [Sector].SectorOp, [Company].Selection) - Deepak Deepak Puri Microsoft MVP - SQL Server *** Sent via Developersdex http://www.developersdex.com *** |
![]() |
| Thread Tools | |
| Display Modes | |
| |