explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RGyP : Optimization for: plan #TP1y

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.036 26,389.158 ↑ 4.8 42 1

Sort (cost=186,608.43..186,608.93 rows=200 width=8) (actual time=26,389.156..26,389.158 rows=42 loops=1)

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

HashAggregate (cost=186,598.78..186,600.78 rows=200 width=8) (actual time=26,389.116..26,389.122 rows=42 loops=1)

  • Group Key: count(orders.o_orderkey)
3. 485.004 26,285.792 ↑ 1.0 150,000 1

GroupAggregate (cost=0.85..184,348.78 rows=150,000 width=8) (actual time=0.109..26,285.792 rows=150,000 loops=1)

  • Group Key: customer.c_custkey
4. 551.826 25,800.788 ↓ 1.0 1,533,923 1

Merge Left Join (cost=0.85..175,349.53 rows=1,499,850 width=8) (actual time=0.019..25,800.788 rows=1,533,923 loops=1)

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

  • Heap Fetches: 150000
6. 25,109.001 25,109.001 ↑ 1.0 1,483,918 1

Index Scan using idx_comment on orders (cost=0.43..147,091.98 rows=1,499,850 width=8) (actual time=0.007..25,109.001 rows=1,483,918 loops=1)

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