explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JhEK

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.016 3,026.383 ↑ 4.8 42 1

Sort (cost=266,223.97..266,224.47 rows=200 width=8) (actual time=3,026.382..3,026.383 rows=42 loops=1)

  • Sort Key: (count(*)), (count(orders.o_orderkey))
  • Sort Method: quicksort Memory: 26kB
2. 29.843 3,026.367 ↑ 4.8 42 1

HashAggregate (cost=266,214.33..266,216.33 rows=200 width=8) (actual time=3,026.359..3,026.367 rows=42 loops=1)

  • Group Key: count(orders.o_orderkey)
3. 187.314 2,996.524 ↑ 1.0 150,000 1

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

  • Group Key: customer.c_custkey
4. 250.137 2,809.210 ↓ 1.0 1,533,923 1

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

  • Merge Cond: (customer.c_custkey = orders.o_custkey)
5. 63.240 63.240 ↑ 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.062..63.240 rows=150,000 loops=1)

  • Heap Fetches: 150000
6. 173.819 2,495.833 ↑ 1.0 1,483,918 1

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

7. 1,562.574 2,322.014 ↑ 1.0 1,483,918 1

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

  • Sort Key: orders.o_custkey
  • Sort Method: external merge Disk: 26056kB
8. 759.440 759.440 ↑ 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..759.440 rows=1,483,918 loops=1)

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