Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

ROLAP MDX vs T-SQL hitting source not filtering

$
0
0

I'm using ROLAP to build a cube off sql server DB engine, using ColumnStore indexes on the source tables. I'm experiencing an issue though with the t-sql hitting the source when expanding my hierarchy while browsing the cube via Excel.

I profile the MDX created, and it's hitting SSAS correctly, stating which hierarchy level member should be expanded. but when profiling the t-sql hitting the DB engine, SSAS is not passing the member value down for filtering, instead, it's just Grouping By the entire lower level of the hierarchy. this speeds up all subsequent expanding in Excel which is great, however, when we get to the lowest granularity level of my hierarchy this imposes a huge performance hit on the DB engine.

it should not group by the entire lowest hierarchy level because that's too expensive, it should filter to only show the lower members for the expanded parent, right?

is this just ROLAP works /  no way to force it to use the filter as generated by the MDX? some excerpt from the MDX generated by Excel, and t-sql that hits the db engine:

     ,
          INCLUDE_CALC_MEMBERS
        )
      }
    },
    { [Events].[Event].[Market].&[9803066] }, //this is the higher/parent level of the hierarchy, so Excel is generating the MDX correctly, to only expand this parent.
    ,
    ,
    INCLUDE_CALC_MEMBERS


the T-SQL:

FROM         FactTable
            )
         AS [FactTable]
                    )
                 AS [dbo_FactTable]
        GROUP BY [dbo_FactTable].[dbo_FactTableEventSelectionID0_12]  -- this is the lower / most granular level of the hierarchy, just below the parent which got expanded. So the DB engine has to group by the most granular level, but no-where in the t-sql does it filter on the expanded parent's IDs, so this query executes for the entire lowest level of the hierarchy.



Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>