explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Q8fF

Settings
# exclusive inclusive rows x rows loops node
1. 0.965 6,501.211 ↓ 179.0 358 1

Sort (cost=13,836,976.94..13,836,976.95 rows=2 width=51) (actual time=6,501.196..6,501.211 rows=358 loops=1)

  • Sort Key: supplier.s_name
  • Sort Method: quicksort Memory: 66kB
2. 420.520 6,500.246 ↓ 179.0 358 1

Nested Loop (cost=11,282.16..13,836,976.93 rows=2 width=51) (actual time=5,773.814..6,500.246 rows=358 loops=1)

3. 2.042 4.136 ↓ 1.0 809 1

Hash Join (cost=1.32..727.33 rows=800 width=55) (actual time=0.022..4.136 rows=809 loops=1)

4. 2.085 2.085 ↑ 1.0 20,000 1

Seq Scan on supplier supplier (cost=0..643 rows=20,000 width=59) (actual time=0.004..2.085 rows=20,000 loops=1)

5. 0.002 0.009 ↑ 1.0 1 1

Hash (cost=1.31..1.31 rows=1 width=4) (actual time=0.009..0.009 rows=1 loops=1)

6. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on nation nation (cost=0..1.31 rows=1 width=4) (actual time=0.005..0.007 rows=1 loops=1)

  • Filter: (n_name = 'INDIA'::bpchar)
7. 306.139 6,075.590 ↓ 152.5 8,693 809

Materialize (cost=11,280.83..13,835,565.75 rows=57 width=4) (actual time=0.027..7.51 rows=8,693 loops=809)

8. 137.023 5,769.451 ↓ 199.5 11,370 1

Hash Join (cost=11,280.83..13,835,565.47 rows=57 width=4) (actual time=21.859..5,769.451 rows=11,370 loops=1)

9. 811.100 5,611.100 ↓ 2.0 1,084,850 1

Seq Scan on partsupp partsupp (cost=0..13,822,884 rows=533,333 width=8) (actual time=0.049..5,611.1 rows=1,084,850 loops=1)

  • Filter: ((ps_availqty)::numeric > (SubPlan 1))
10.          

SubPlan (for Seq Scan)

11. 1,600.000 4,800.000 ↑ 1.0 1 1,600,000

Aggregate (cost=8.59..8.6 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=1,600,000)

12. 3,200.000 3,200.000 ↑ 1.0 1 1,600,000

Index Scan using lineitem_pkey_shipd_skey on lineitem lineitem (cost=0.56..8.58 rows=1 width=5) (actual time=0.002..0.002 rows=1 loops=1,600,000)

  • Index Cond: ((l_partkey = partsupp.ps_partkey) AND (l_suppkey = partsupp.ps_suppkey) AND (l_shipdate >= '1997-01-01'::date) AND (l_shipdate < '1998-01-01'::date))
13. 0.775 21.328 ↓ 104.6 4,185 1

Hash (cost=11,280.33..11,280.33 rows=40 width=4) (actual time=21.328..21.328 rows=4,185 loops=1)

14. 1.997 20.553 ↓ 104.6 4,185 1

Gather (cost=1,000..11,280.33 rows=40 width=4) (actual time=0.215..20.553 rows=4,185 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
15. 18.556 18.556 ↓ 82.1 1,395 3 / 3

Seq Scan on part part (cost=0..10,276.33 rows=17 width=4) (actual time=0.018..18.556 rows=1,395 loops=3)

  • Filter: ((p_name)::text ~~ 'ivory%'::text)
Planning time : 0.291 ms
Execution time : 6,501.417 ms