explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ixOv

Settings
# exclusive inclusive rows x rows loops node
1. 86.832 2,700.022 ↑ 1.3 24,593 1

Sort (cost=248,425.53..248,505.88 rows=32,141 width=44) (actual time=2,698.292..2,700.022 rows=24,593 loops=1)

  • Sort Key: (count(DISTINCT partsupp.ps_suppkey)) DESC, part.p_brand, part.p_type, part.p_size
  • Sort Method: quicksort Memory: 2,711kB
2. 59.130 2,613.190 ↑ 1.3 24,593 1

GroupAggregate (cost=244,196.32..246,019.43 rows=32,141 width=44) (actual time=2,457.806..2,613.19 rows=24,593 loops=1)

  • Group Key: part.p_brand, part.p_type, part.p_size
3. 897.241 2,554.060 ↓ 2.0 238,616 1

Sort (cost=244,196.32..244,496.66 rows=120,136 width=40) (actual time=2,457.786..2,554.06 rows=238,616 loops=1)

  • Sort Key: part.p_brand, part.p_type, part.p_size
  • Sort Method: external merge Disk: 12,216kB
4. 0.000 1,656.819 ↓ 2.0 238,616 1

Gather (cost=1,693.43..230,773.76 rows=120,136 width=40) (actual time=7.828..1,656.819 rows=238,616 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 0.000 1,713.605 ↓ 1.6 79,539 3 / 3

Nested Loop (cost=693.43..217,760.16 rows=50,057 width=40) (actual time=6.537..1,713.605 rows=79,539 loops=3)

6. 154.850 161.268 ↓ 1.6 533,067 3 / 3

Seq Scan on partsupp partsupp (cost=693..43,910.34 rows=333,333 width=8) (actual time=6.437..161.268 rows=533,067 loops=3)

  • Filter: (NOT (hashed SubPlan 1))
7.          

SubPlan (for Seq Scan)

8. 6.418 6.418 ↓ 5.0 10 3 / 3

Seq Scan on supplier supplier (cost=0..693 rows=2 width=4) (actual time=0.109..6.418 rows=10 loops=3)

  • Filter: ((s_comment)::text ~~ '%Customer%Complaints%'::text)
9. 1,599.200 1,599.200 ↓ 0.0 0 1,599,200 / 3

Index Only Scan using part_pkey_brand_type_size on part part (cost=0.42..0.51 rows=1 width=40) (actual time=0.003..0.003 rows=0 loops=1,599,200)

  • Index Cond: (p_partkey = partsupp.ps_partkey)
  • Filter: ((p_brand <> 'Brand#13'::bpchar) AND ((p_type)::text !~~ 'PROMO PLATED%'::text) AND (p_size = ANY ('{29,22,49,20,13,3,44,48}'::integer[])))
  • Heap Fetches: 1,599,200
Planning time : 0.239 ms
Execution time : 2,703.038 ms