explain.depesz.com

PostgreSQL's explain analyze made readable

Result: w6Wu

Settings
# exclusive inclusive rows x rows loops node
1. 86.677 1,604.761 ↑ 1.3 24,593 1

Sort (cost=125,555.82..125,636.17 rows=32,141 width=44) (actual time=1,603.303..1,604.761 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. 60.647 1,518.084 ↑ 1.3 24,593 1

GroupAggregate (cost=121,326.62..123,149.73 rows=32,141 width=44) (actual time=1,358.076..1,518.084 rows=24,593 loops=1)

  • Group Key: part.p_brand, part.p_type, part.p_size
3. 786.477 1,457.437 ↓ 2.0 238,616 1

Sort (cost=121,326.62..121,626.96 rows=120,136 width=40) (actual time=1,358.057..1,457.437 rows=238,616 loops=1)

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

Merge Join (cost=23,654.14..107,904.06 rows=120,136 width=40) (actual time=109.456..670.96 rows=238,616 loops=1)

5. 389.842 394.361 ↓ 2.0 1,599,165 1

Index Scan using partsupp_pkey on partsupp partsupp (cost=693.43..81,141.33 rows=800,000 width=8) (actual time=4.538..394.361 rows=1,599,165 loops=1)

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

SubPlan (for Index Scan)

7. 4.519 4.519 ↓ 5.0 10 1

Seq Scan on supplier supplier (cost=0..693 rows=2 width=4) (actual time=0.088..4.519 rows=10 loops=1)

  • Filter: ((s_comment)::text ~~ '%Customer%Complaints%'::text)
8. 52.752 132.605 ↓ 4.0 238,613 1

Sort (cost=22,960.69..23,110.86 rows=60,068 width=40) (actual time=104.892..132.605 rows=238,613 loops=1)

  • Sort Key: part.p_partkey
  • Sort Method: external sort Disk: 3,296kB
9. 79.853 79.853 ↑ 1.0 59,686 1

Seq Scan on part part (cost=0..18,193 rows=60,068 width=40) (actual time=0.011..79.853 rows=59,686 loops=1)

  • 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[])))
Planning time : 0.287 ms
Execution time : 1,608.041 ms