explain.depesz.com

PostgreSQL's explain analyze made readable

Result: m9wh

Settings
# exclusive inclusive rows x rows loops node
1. 89.046 1,282.030 ↑ 1.3 24,593 1

Sort (cost=88,706.79..88,787.14 rows=32,141 width=44) (actual time=1,280.383..1,282.03 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.445 1,192.984 ↑ 1.3 24,593 1

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

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

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

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

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

  • Workers Planned: 2
  • Workers Launched: 2
5. 95.542 291.034 ↓ 1.6 79,539 3 / 3

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

6. 142.104 148.710 ↓ 1.6 533,067 3 / 3

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

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

SubPlan (for Seq Scan)

8. 6.606 6.606 ↓ 5.0 10 3 / 3

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

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

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

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

Seq Scan on part part (cost=0..12,359.67 rows=25,028 width=40) (actual time=0.008..40.23 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.507 ms
Execution time : 1,285.931 ms