[Mondrian] Infobright Distinct Count

Tom Barber Tom.Barber at ecommera.co.uk
Tue Feb 8 07:10:15 EST 2011

Hey Guys,

I'm working with Pedro on a project involving Infobright(3.4.2). Pedro noticed that Mondrian is executing the following:

select count(*) as `c0` from (select distinct `dim_marketing_sources`.`sublevel2` as `c0`, `dim_marketing_sources`.`sublevel1` as `c1`, `dim_marketing_sources`.`mkt_channel` as `c2` from `dim_marketing_sources` as `dim_marketing_sources`) as `init`;

which takes 18 seconds to execute where as,

select count(distinct `dim_marketing_sources`.`sublevel2` , `dim_marketing_sources`.`sublevel1`, `dim_marketing_sources`.`mkt_channel`) as `c` from `dim_marketing_sources`;

takes less than 1.

Is there any technical reason why the top count is preferred and if not, what needs to occur for the dialect to change? :)



More information about the Mondrian mailing list