explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2Cyh

Settings
# exclusive inclusive rows x rows loops node
1. 86.258 1,276.875 ↑ 1.3 24,593 1

Sort (cost=88,706.79..88,787.14 rows=32,141 width=44) (actual time=1,275.294..1,276.875 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.072 1,190.617 ↑ 1.3 24,593 1

GroupAggregate (cost=84,477.58..86,300.69 rows=32,141 width=44) (actual time=1,033.762..1,190.617 rows=24,593 loops=1)

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

Sort (cost=84,477.58..84,777.92 rows=120,136 width=40) (actual time=1,033.743..1,130.545 rows=238,616 loops=1)

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

Gather (cost=14,365.52..71,055.02 rows=120,136 width=40) (actual time=56.942..295.415 rows=238,616 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
5. 96.187 292.651 ↓ 1.6 79,539 3 / 3

Hash Join (cost=13,365.52..58,041.42 rows=50,057 width=40) (actual time=53.808..292.651 rows=79,539 loops=3)

6. 142.862 149.455 ↓ 1.6 533,067 3 / 3

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

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

SubPlan (for Seq Scan)

8. 6.593 6.593 ↓ 5.0 10 3 / 3

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

  • Filter: ((s_comment)::text ~~ '%Customer%Complaints%'::text)
9. 6.599 47.009 ↑ 1.3 19,895 3 / 3

Hash (cost=12,359.67..12,359.67 rows=25,028 width=40) (actual time=47.008..47.009 rows=19,895 loops=3)

10. 40.410 40.410 ↑ 1.3 19,895 3 / 3

Seq Scan on part part (cost=0..12,359.67 rows=25,028 width=40) (actual time=0.011..40.41 rows=19,895 loops=3)

  • 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,280.689 ms