explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 73RU

Settings
# exclusive inclusive rows x rows loops node
1. 46.260 4,616.375 ↑ 27.2 11,620 1

HashAggregate (cost=261,988.78..265,934.32 rows=315,643 width=44) (actual time=4,605.790..4,616.375 rows=11,620 loops=1)

  • Output: lineitem.l_orderkey, sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))), orders.o_orderdate, orders.o_shippriority
  • Group Key: lineitem.l_orderkey, orders.o_orderdate, orders.o_shippriority
  • Buffers: shared hit=142183
2. 1,449.446 4,570.115 ↑ 10.3 30,519 1

Hash Join (cost=54,424.90..257,254.14 rows=315,643 width=24) (actual time=1,020.134..4,570.115 rows=30,519 loops=1)

  • Output: lineitem.l_orderkey, orders.o_orderdate, orders.o_shippriority, lineitem.l_extendedprice, lineitem.l_discount
  • Hash Cond: (lineitem.l_orderkey = orders.o_orderkey)
  • Buffers: shared hit=142183
3. 2,102.126 2,102.126 ↓ 1.0 3,241,776 1

Seq Scan on public.lineitem (cost=0.00..187,519.39 rows=3,240,913 width=16) (actual time=0.007..2,102.126 rows=3,241,776 loops=1)

  • Output: lineitem.l_orderkey, lineitem.l_partkey, lineitem.l_suppkey, lineitem.l_linenumber, lineitem.l_quantity, lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_tax, lineitem.l_returnflag, lineitem.l_linestatus, lineitem.l_shipdate, lineitem.l_commitdate, lineitem.l_receiptdate, lineitem.l_shipinstruct, lineitem.l_shipmode, lineitem.l_comment
  • Filter: (lineitem.l_shipdate > '1995-03-15'::date)
  • Rows Removed by Filter: 2759439
  • Buffers: shared hit=112503
4. 84.733 1,018.543 ↓ 1.0 147,126 1

Hash (cost=52,598.77..52,598.77 rows=146,090 width=12) (actual time=1,018.543..1,018.543 rows=147,126 loops=1)

  • Output: orders.o_orderdate, orders.o_shippriority, orders.o_orderkey
  • Buckets: 262144 Batches: 1 Memory Usage: 8370kB
  • Buffers: shared hit=29680
5. 411.887 933.810 ↓ 1.0 147,126 1

Hash Join (cost=5,834.69..52,598.77 rows=146,090 width=12) (actual time=55.099..933.810 rows=147,126 loops=1)

  • Output: orders.o_orderdate, orders.o_shippriority, orders.o_orderkey
  • Inner Unique: true
  • Hash Cond: (orders.o_custkey = customer.c_custkey)
  • Buffers: shared hit=29680
6. 467.003 467.003 ↑ 1.0 727,305 1

Seq Scan on public.orders (cost=0.00..44,845.00 rows=731,059 width=16) (actual time=0.005..467.003 rows=727,305 loops=1)

  • Output: orders.o_orderkey, orders.o_custkey, orders.o_orderstatus, orders.o_totalprice, orders.o_orderdate, orders.o_orderpriority, orders.o_clerk, orders.o_shippriority, orders.o_comment
  • Filter: (orders.o_orderdate < '1995-03-15'::date)
  • Rows Removed by Filter: 772695
  • Buffers: shared hit=26095
7. 14.932 54.920 ↓ 1.0 30,142 1

Hash (cost=5,460.00..5,460.00 rows=29,975 width=4) (actual time=54.919..54.920 rows=30,142 loops=1)

  • Output: customer.c_custkey
  • Buckets: 32768 Batches: 1 Memory Usage: 1316kB
  • Buffers: shared hit=3585
8. 39.988 39.988 ↓ 1.0 30,142 1

Seq Scan on public.customer (cost=0.00..5,460.00 rows=29,975 width=4) (actual time=0.005..39.988 rows=30,142 loops=1)

  • Output: customer.c_custkey
  • Filter: (customer.c_mktsegment = 'BUILDING'::bpchar)
  • Rows Removed by Filter: 119858
  • Buffers: shared hit=3585
Planning time : 0.864 ms
Execution time : 4,667.041 ms