explain.depesz.com

PostgreSQL's explain analyze made readable

Result: SJWZ

Settings
# exclusive inclusive rows x rows loops node
1. 87.046 1,277.040 ↑ 1.3 24,593 1

Sort (cost=88,706.79..88,787.14 rows=32,141 width=44) (actual time=1,275.388..1,277.04 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. 62.227 1,189.994 ↑ 1.3 24,593 1

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

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

Sort (cost=84,477.58..84,777.92 rows=120,136 width=40) (actual time=1,026.348..1,127.767 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.935 292.997 ↓ 2.0 238,616 1

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

  • Workers Planned: 2
  • Workers Launched: 2
5. 95.628 291.062 ↓ 1.6 79,539 3 / 3

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

6. 141.675 148.275 ↓ 1.6 533,067 3 / 3

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

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

SubPlan (for Seq Scan)

8. 6.600 6.600 ↓ 5.0 10 3 / 3

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

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

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

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

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