Enable BI mode to rewrite queries automatically
You must enable BI mode to combine the BI capability with the power of transparent materialized view rewritings.
If you want your incoming queries, at different granularity levels, to be answered directly from the materialized view rather than being computed from the source tables, you must enable BI mode. BI mode is disabled by default.
With the BI mode enabled, any incoming queries will be sliced and diced at different
granular levels to be answered directly from the materialized view.
SELECT country, count(distinct userid)
FROM visitors
GROUP BY country;
SELECT country, state, count(distinct userid)
FROM visitors
GROUP BY country, state;
SELECT country, state, count(distinct userid)
FROM visitors
WHERE country = ‘USA’
GROUP BY country, state;