Hi team,
can you please advice how to effectively accelerate below query.
it is cca 30M rows and whatever reflection i create it scans all 30M rows.
I tried to created view and raw reflection on it with aggregation with the same result.
thanks.
Jaro
select “region”,
“priority”,
cast(count(distinct(“model_account_id”)) as DOUBLE) + cast(max(“C1”) as DOUBLE) as “C1”
from
(
select “fisc_wk_val”,
“fisc_qtr_val”,
“quarter”,
“lever”,
“lob”,
“region”,
“country”,
“global_segment”,
“unified_segment”,
“sls_bu_level2_desc”,
“sls_bu_level3_desc”,
“sls_bu_level4_desc”,
“mkt_lvl5”,
“model_account_id”,
“dell_acct_name”,
“org_acct_id”,
“priority”,
“selection_criteria”,
“exclusions”,
“selection_reason”,
“last_updated_datetime”,
“output_run_id”,
case
when “model_account_id” is null
then 1
else 0
end as “C1”
from "nessie.“table”
) as “ITBL”
group by “region”,
“priority”