explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 72HO

Settings
# exclusive inclusive rows x rows loops node
1. 0.028 4,594.291 ↑ 4.8 42 1

Sort (cost=266,223.97..266,224.47 rows=200 width=8) (actual time=4,594.287..4,594.291 rows=42 loops=1)

  • Sort Key: (count(*)), (count(orders.o_orderkey))
  • Sort Method: quicksort Memory: 26kB
2. 46.051 4,594.263 ↑ 4.8 42 1

HashAggregate (cost=266,214.33..266,216.33 rows=200 width=8) (actual time=4,594.251..4,594.263 rows=42 loops=1)

  • Group Key: count(orders.o_orderkey)
3. 286.766 4,548.212 ↑ 1.0 150,000 1

GroupAggregate (cost=219,210.17..263,964.33 rows=150,000 width=8) (actual time=2,823.960..4,548.212 rows=150,000 loops=1)

  • Group Key: customer.c_custkey
4. 384.278 4,261.446 ↓ 1.0 1,533,923 1

Merge Left Join (cost=219,210.17..254,965.08 rows=1,499,850 width=8) (actual time=2,823.928..4,261.446 rows=1,533,923 loops=1)

  • Merge Cond: (customer.c_custkey = orders.o_custkey)
5. 96.882 96.882 ↑ 1.0 150,000 1

Index Only Scan using pkcustomer on customer (cost=0.42..9,134.43 rows=150,000 width=4) (actual time=0.008..96.882 rows=150,000 loops=1)

  • Heap Fetches: 150000
6. 261.225 3,780.286 ↑ 1.0 1,483,918 1

Materialize (cost=219,209.01..226,708.26 rows=1,499,850 width=8) (actual time=2,823.913..3,780.286 rows=1,483,918 loops=1)

7. 2,383.934 3,519.061 ↑ 1.0 1,483,918 1

Sort (cost=219,209.01..222,958.64 rows=1,499,850 width=8) (actual time=2,823.910..3,519.061 rows=1,483,918 loops=1)

  • Sort Key: orders.o_custkey
  • Sort Method: external merge Disk: 26056kB
8. 1,135.127 1,135.127 ↑ 1.0 1,483,918 1

Seq Scan on orders (cost=0.00..44,845.00 rows=1,499,850 width=8) (actual time=0.019..1,135.127 rows=1,483,918 loops=1)

  • Filter: ((o_comment)::text !~~ '%special%requests%'::text)
  • Rows Removed by Filter: 16082