explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4P4V : q18-norm

Settings
# exclusive inclusive rows x rows loops node
1. 0.066 4,882.081 ↑ 52,643.7 57 1

Sort (cost=1,627,931.35..1,635,433.08 rows=3,000,690 width=71) (actual time=4,882.079..4,882.081 rows=57 loops=1)

  • Sort Key: o.o_totalprice DESC, o.o_orderdate
  • Sort Method: quicksort Memory: 29kB
2. 0.202 4,882.015 ↑ 52,643.7 57 1

GroupAggregate (cost=1,061,999.08..1,152,019.78 rows=3,000,690 width=44) (actual time=4,881.822..4,882.015 rows=57 loops=1)

  • Group Key: c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice
3. 1.240 4,881.813 ↑ 7,520.5 399 1

Sort (cost=1,061,999.08..1,069,500.80 rows=3,000,690 width=44) (actual time=4,881.787..4,881.813 rows=399 loops=1)

  • Sort Key: c.c_name, c.c_custkey, o.o_orderkey, o.o_orderdate, o.o_totalprice
  • Sort Method: quicksort Memory: 56kB
4. 1.792 4,880.573 ↑ 7,520.5 399 1

Hash Join (cost=380,574.55..646,862.90 rows=3,000,690 width=44) (actual time=3,601.967..4,880.573 rows=399 loops=1)

  • Hash Cond: (o.o_custkey = c.c_custkey)
5. 602.083 4,817.620 ↑ 7,520.5 399 1

Hash Join (cost=373,614.55..598,643.41 rows=3,000,690 width=25) (actual time=3,539.586..4,817.620 rows=399 loops=1)

  • Hash Cond: (l.l_orderkey = o.o_orderkey)
6. 682.426 682.426 ↑ 1.0 6,001,215 1

Seq Scan on lineitem l (cost=0.00..172,516.79 rows=6,001,379 width=9) (actual time=0.005..682.426 rows=6,001,215 loops=1)

7. 0.231 3,533.111 ↑ 13,157.9 57 1

Hash (cost=364,239.55..364,239.55 rows=750,000 width=24) (actual time=3,533.111..3,533.111 rows=57 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 8196kB
8. 193.683 3,532.880 ↑ 13,157.9 57 1

Hash Join (cost=313,486.46..364,239.55 rows=750,000 width=24) (actual time=3,157.105..3,532.880 rows=57 loops=1)

  • Hash Cond: (o.o_orderkey = l2.l_orderkey)
9. 185.386 185.386 ↑ 1.0 1,500,000 1

Seq Scan on orders o (cost=0.00..41,095.00 rows=1,500,000 width=20) (actual time=0.013..185.386 rows=1,500,000 loops=1)

10. 0.287 3,153.811 ↑ 7,075.6 57 1

Hash (cost=308,445.10..308,445.10 rows=403,309 width=4) (actual time=3,153.811..3,153.811 rows=57 loops=1)

  • Buckets: 524288 Batches: 1 Memory Usage: 4099kB
11. 1,803.946 3,153.524 ↑ 7,075.6 57 1

GroupAggregate (cost=0.43..304,412.01 rows=403,309 width=9) (actual time=3.775..3,153.524 rows=57 loops=1)

  • Group Key: l2.l_orderkey
  • Filter: (sum(l2.l_quantity) > '300'::numeric)
  • Rows Removed by Filter: 1499943
12. 1,349.578 1,349.578 ↑ 1.0 6,001,215 1

Index Scan using lineitem_idx_4 on lineitem l2 (cost=0.43..268,355.48 rows=6,001,379 width=9) (actual time=0.019..1,349.578 rows=6,001,215 loops=1)

13. 32.277 61.161 ↑ 1.0 150,000 1

Hash (cost=5,085.00..5,085.00 rows=150,000 width=23) (actual time=61.161..61.161 rows=150,000 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 10252kB
14. 28.884 28.884 ↑ 1.0 150,000 1

Seq Scan on customer c (cost=0.00..5,085.00 rows=150,000 width=23) (actual time=0.007..28.884 rows=150,000 loops=1)

Planning time : 3.768 ms
Execution time : 4,883.504 ms