Article
· Mar 14, 2016 3m read

Execute an MDX query in the DeepSee Shell with/without results cache

The DeepSee Shell best Practices Series - Execute an MDX query in the DeepSee Shell with/without  results cache

This cache is different from cache reset. Cache reset clears everything in the namespace but “cache off” only clears the cache in ^DeepSee.Cache.Results and ^DeepSee.Cache.Axis global node for the corresponding cube. The difference is quite smaller in the case as below, but in some cases it can be a big difference.

^DeepSee.Cache.Results, which contains values for each query previously executed for a given cube. This global also contains meta-information about those queries that can be used to quickly rerun them.

^DeepSee.Cache.Axis, which contains metadata about the axes of previously run queries. DeepSee uses this information whenever it needs to iterate through the axes of a given query.

>>cache

Cache is: off

>>SELECT {[Measures].[%COUNT],[Measures].[Allergy Count],[MEASURES].[MEDIAN TEST SCORE]} ON 0,NON EMPTY HEAD(NONEMPTYCROSSJOIN([AgeD].[H1].[Age Group].Members,[AgeD].[H1].[Age Bucket].Members),2000) ON 1 FROM [PATIENTS] %FILTER [GenD].[H1].[Gender].&[Female]

Patient Count Allergy Count Median Test Scor

1 0 to 29->0 to 9 69 45 73.50

2 0 to 29->10 to 19 74 47 75.50

3 0 to 29->20 to 29 80 56 68.00

4 30 to 59->30 to 3 82 43 77.00

5 30 to 59->40 to 4 75 49 75.00

6 30 to 59->50 to 5 58 43 68.00

7 60+->60 to 69 43 24 68.00

8 60+->70 to 79 24 16 70.50

9 60+->80+ 20 9 78.00

Elapsed time: .137912s

>>cache on

Cache is: on

>>SELECT {[Measures].[%COUNT],[Measures].[Allergy Count],[MEASURES].[MEDIAN TEST SCORE]} ON 0,NON EMPTY HEAD(NONEMPTYCROSSJOIN([AgeD].[H1].[Age Group].Members,[AgeD].[H1].[Age Bucket].Members),2000) ON 1 FROM [PATIENTS] %FILTER [GenD].[H1].[Gender].&[Female]

Patient Count Allergy Count Median Test Scor

1 0 to 29->0 to 9 69 45 73.50

2 0 to 29->10 to 19 74 47 75.50

3 0 to 29->20 to 29 80 56 68.00

4 30 to 59->30 to 3 82 43 77.00

5 30 to 59->40 to 4 75 49 75.00

6 30 to 59->50 to 5 58 43 68.00

7 60+->60 to 69 43 24 68.00

8 60+->70 to 79 24 16 70.50

9 60+->80+ 20 9 78.00

Elapsed time: .029382s

>>cache off

Cache is: off

>>SELECT {[Measures].[%COUNT],[Measures].[Allergy Count],[MEASURES].[MEDIAN TEST SCORE]} ON 0,NON EMPTY HEAD(NONEMPTYCROSSJOIN([AgeD].[H1].[Age Group].Members,[AgeD].[H1].[Age Bucket].Members),2000) ON 1 FROM [PATIENTS] %FILTER [GenD].[H1].[Gender].&[Female]

Patient Count Allergy Count Median Test Scor

1 0 to 29->0 to 9 69 45 73.50

2 0 to 29->10 to 19 74 47 75.50

3 0 to 29->20 to 29 80 56 68.00

4 30 to 59->30 to 3 82 43 77.00

5 30 to 59->40 to 4 75 49 75.00

6 30 to 59->50 to 5 58 43 68.00

7 60+->60 to 69 43 24 68.00

8 60+->70 to 79 24 16 70.50

9 60+->80+ 20 9 78.00

Elapsed time: .139437s

 

The DeepSee Shell Best Practices Series

Run MDX queries in the DeepSee Shell

Get your MDX query performance stats from the DeepSee Shell

Reset your DeepSee cache in the DeepSee Shell

Execute an MDX query in the DeepSee Shell with/without results cache

Get your MDX query plan, MDX query trace and more from the DeepSee Shell

Example of using the MDX subquery flag in the DeepSee Shell

Debugging measures in the DeepSee Shell 

Discussion (0)0
Log in or sign up to continue