load 'auto_explain'; LOAD set auto_explain.log_min_duration to 0; SET set auto_explain.log_analyze to on; SET set auto_explain.log_wal to on; SET set auto_explain.log_timing to on; SET set auto_explain.log_level to notice; SET BEGIN; BEGIN select sum(l_extendedprice * l_discount) as revenue from lineitem where l_shipdate >= date '1994-01-01' and l_shipdate < cast(date '1994-01-01' + interval '1 year' as date) and l_discount between 0.03 - 0.01 and 0.03 + 0.01 and l_quantity < 25; NOTICE: duration: 13937.730 ms plan: Query Text: select sum(l_extendedprice * l_discount) as revenue from lineitem where l_shipdate >= date '1994-01-01' and l_shipdate < cast(date '1994-01-01' + interval '1 year' as date) and l_discount between 0.03 - 0.01 and 0.03 + 0.01 and l_quantity < 25; Finalize Aggregate (cost=1724133.87..1724133.88 rows=1 width=32) (actual time=13937.620..13937.718 rows=1 loops=1) -> Gather (cost=1724133.65..1724133.86 rows=2 width=32) (actual time=13937.605..13937.706 rows=3 loops=1) Workers Planned: 2 Workers Launched: 2 -> Partial Aggregate (cost=1723133.65..1723133.66 rows=1 width=32) (actual time=13914.449..13914.450 rows=1 loops=3) -> Parallel Seq Scan on lineitem (cost=0.00..1720622.03 rows=502324 width=12) (actual time=0.089..13472.246 rows=396969 loops=3) Filter: ((l_shipdate >= '1994-01-01'::date) AND (l_shipdate < '1995-01-01'::date) AND (l_discount >= 0.02) AND (l_discount <= 0.04) AND (l_quantity < '25'::numeric)) Rows Removed by Filter: 19598141 revenue ---------------- 669487394.1805 (1 row) COMMIT; COMMIT