Apurva Sherke
01/24/2025, 4:49 PMMayank
Apurva Sherke
01/27/2025, 9:41 PMMayank
Mayank
Apurva Sherke
01/27/2025, 9:45 PMMayank
Apurva Sherke
01/27/2025, 9:48 PMApurva Sherke
01/27/2025, 9:48 PMMayank
Apurva Sherke
01/27/2025, 9:53 PMEXPLAIN PLAN FOR
SELECT
fact.scenario,
fact.period,
fact.process_type,
fact.source_type,
fact.channel_id,
rev.parent_id as rev,
fact.account_id,
fact.product_id,
fact.company_id,
fact.location_id,
project.parent_id as project,
sum(fact.usd_amount) as usd_amount,
sum(fact.constant_amount) as constant_amount
FROM fact_data fact
INNER JOIN ref_project project ON fact.project_id = project.child_id
INNER JOIN ref_rev rev ON fact.rev_id = rev.child_id
INNER JOIN ref_account acct ON fact.account_id = acct.child_id
GROUP BY
fact.scenario,
fact.period,
fact.process_type,
fact.source_type,
fact.channel_id,
rev.parent_id,
fact.account_id,
fact.product_id,
fact.company_id,
fact.location_id,
project.parent_id;
Execution Plan
LogicalProject(scenario=[$7], period=[$4], process_type=[$5], source_type=[$8], channel_id=[$1], parent_id0=[$10], account_id=[$0], product_id=[$6], company_id=[$2], location_id=[$3], parent_id=[$9], usd_amount=[$11], constant_amount=[$12])
PinotLogicalAggregate(group=[{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}], agg#0=[$SUM0($11)], agg#1=[$SUM0($12)])
PinotLogicalExchange(distribution=[hash[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]])
PinotLogicalAggregate(group=[{0, 1, 2, 4, 5, 6, 7, 8, 9, 11, 12}], agg#0=[$SUM0($10)], agg#1=[$SUM0($3)])
LogicalJoin(condition=[=($0, $13)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(account_id=[$0], channel_id=[$1], company_id=[$2], constant_amount=[$3], location_id=[$4], period=[$5], process_type=[$6], product_id=[$7], scenario=[$9], source_type=[$10], usd_amount=[$11], parent_id=[$12], parent_id0=[$14])
LogicalJoin(condition=[=($8, $13)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[8]])
LogicalProject(account_id=[$0], channel_id=[$1], company_id=[$2], constant_amount=[$3], location_id=[$4], period=[$5], process_type=[$6], product_id=[$7], rev_id=[$9], scenario=[$10], source_type=[$11], usd_amount=[$12], parent_id=[$14])
LogicalJoin(condition=[=($8, $13)], joinType=[inner])
PinotLogicalExchange(distribution=[hash[8]])
LogicalProject(account_id=[$3], channel_id=[$5], company_id=[$6], constant_amount=[$7], location_id=[$14], period=[$15], process_type=[$16], product_id=[$17], project_id=[$18], rev_id=[$19], scenario=[$20], source_type=[$21], usd_amount=[$22])
LogicalTableScan(table=[[default, fact_data]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(child_id=[$3], parent_id=[$6])
LogicalTableScan(table=[[default, ref_project]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(child_id=[$3], parent_id=[$6])
LogicalTableScan(table=[[default, ref_rev]])
PinotLogicalExchange(distribution=[hash[0]])
LogicalProject(child_id=[$8])
LogicalTableScan(table=[[default, ref_account]])Mayank
Mayank
Apurva Sherke
01/27/2025, 9:57 PMMayank
Apurva Sherke
01/27/2025, 9:59 PMMayank
Mayank
Apurva Sherke
01/27/2025, 10:00 PMMayank
Apurva Sherke
01/27/2025, 10:03 PMMayank
Mayank
Apurva Sherke
01/27/2025, 10:13 PMMayank