BEGIN; BEGIN EXPLAIN (ANALYZE, BUFFERS) select 100.00 * sum(case when p_type like 'PROMO%' then l_extendedprice * (1 - l_discount) else 0 end) / sum(l_extendedprice * (1 - l_discount)) as promo_revenue from lineitem, part where l_partkey = p_partkey and l_shipdate >= date '1994-09-01' and l_shipdate < cast(date '1994-09-01' + interval '1 month' as date); QUERY PLAN -------------------------------------------------------------------------------------------------------------------------------------------------------------------- Aggregate (cost=1183059.65..1183059.67 rows=1 width=29) (actual time=21872.969..21872.969 rows=1 loops=1) -> Remote Subquery Scan on all (datanode_1_1,datanode_2_1) (cost=102770.09..1168839.66 rows=812571 width=29) (actual time=21872.925..21872.929 rows=2 loops=1) Planning time: 1.048 ms Execution time: 21876.589 ms (4 rows) COMMIT; COMMIT