Why Mondrian executes so many SQLs given a slicer?
sasakigao opened this issue · comments
Mondrian seems to run a lot of groupby sqls before getting the aggregation results, such as
select
`t`.`year` as `c0`
from
`table` as `t`
where
UPPER(`t`.`c0`) = UPPER('1997')
group by
`t`.`c0`
order by
ISNULL(`c0`) ASC, `c0` ASC
When the slicer includes a number of values, like {[Time].[1997],[Time].[1998],[Time].[1999]}
, Mondrian will execute a groupby sql for each of the values.
My mdx contains hundreds of values in one dimension, so it often costs too much on executing these sqls. Even retrieved from cache, they are still executed while querying the cache with the values directly seems more reasonable.
There anyone knows the reason? Thanks a lot.
I also have this question. Is there any configuration or property in Mondrian to stop the queries which are executed before the final query?
Same to me? Can someone help?