explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LKTu

Settings
# exclusive inclusive rows x rows loops node
1. 0.100 1,311.051 ↑ 1.0 10 1

Limit (cost=154,090.72..154,091.89 rows=10 width=229) (actual time=1,289.568..1,311.051 rows=10 loops=1)

2. 24.792 1,310.951 ↑ 74.6 10 1

Gather Merge (cost=154,090.72..154,177.76 rows=746 width=229) (actual time=1,289.546..1,310.951 rows=10 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.159 1,286.159 ↑ 53.3 7 3 / 3

Sort (cost=153,090.70..153,091.63 rows=373 width=229) (actual time=1,286.153..1,286.159 rows=7 loops=3)

  • Sort Key: nation.n_name, supplier.su_name, item.i_id
  • Sort Method: quicksort Memory: 29kB
  • Worker 0: Sort Method: quicksort Memory: 26kB
  • Worker 1: Sort Method: quicksort Memory: 30kB
4. 0.200 1,286.000 ↑ 26.6 14 3 / 3

Hash Join (cost=5,760.60..153,082.64 rows=373 width=229) (actual time=274.298..1,286.000 rows=14 loops=3)

  • Hash Cond: (mod((stock.s_w_id * stock.s_i_id), '10000'::numeric) = (supplier.su_suppkey)::numeric)
5. 500.054 1,260.318 ↑ 1.9 20 3 / 3

Hash Join (cost=5,296.60..152,577.85 rows=37 width=36) (actual time=225.034..1,260.318 rows=20 loops=3)

  • Hash Cond: ((stock.s_i_id = item.i_id) AND (stock.s_quantity = ref_test_102492.m_s_quantity))
6. 558.433 558.433 ↑ 1.3 500,000 3 / 3

Parallel Seq Scan on stock_102295 stock (cost=0.00..142,592.79 rows=625,079 width=16) (actual time=0.009..558.433 rows=500,000 loops=3)

7. 1.767 201.831 ↓ 1.3 1,505 3 / 3

Hash (cost=5,278.57..5,278.57 rows=1,202 width=71) (actual time=201.830..201.831 rows=1,505 loops=3)

  • Buckets: 2048 Batches: 1 Memory Usage: 120kB
8. 91.432 200.064 ↓ 1.3 1,505 3 / 3

Hash Join (cost=3,986.25..5,278.57 rows=1,202 width=71) (actual time=28.467..200.064 rows=1,505 loops=3)

  • Hash Cond: (ref_test_102492.m_i_id = item.i_id)
9. 80.382 80.382 ↓ 1.7 99,980 3 / 3

Seq Scan on ref_test_102492 (cost=0.00..1,136.10 rows=59,510 width=46) (actual time=0.014..80.382 rows=99,980 loops=3)

10. 1.725 28.250 ↑ 1.3 1,506 3 / 3

Hash (cost=3,961.00..3,961.00 rows=2,020 width=25) (actual time=28.249..28.250 rows=1,506 loops=3)

  • Buckets: 2048 Batches: 1 Memory Usage: 103kB
11. 26.525 26.525 ↑ 1.3 1,506 3 / 3

Seq Scan on item_102491 item (cost=0.00..3,961.00 rows=2,020 width=25) (actual time=0.036..26.525 rows=1,506 loops=3)

  • Filter: ((i_data)::text ~~ '%b'::text)
  • Rows Removed by Filter: 98494
12. 4.493 25.482 ↓ 1.8 3,572 3 / 3

Hash (cost=438.99..438.99 rows=2,000 width=204) (actual time=25.481..25.482 rows=3,572 loops=3)

  • Buckets: 4096 (originally 2048) Batches: 1 (originally 1) Memory Usage: 859kB
13. 12.348 20.989 ↓ 1.8 3,572 3 / 3

Hash Join (cost=4.14..438.99 rows=2,000 width=204) (actual time=0.257..20.989 rows=3,572 loops=3)

  • Hash Cond: (supplier.su_nationkey = nation.n_nationkey)
14. 8.442 8.442 ↑ 1.0 10,000 3 / 3

Seq Scan on supplier_102010 supplier (cost=0.00..378.00 rows=10,000 width=182) (actual time=0.018..8.442 rows=10,000 loops=3)

15. 0.022 0.199 ↓ 1.8 22 3 / 3

Hash (cost=3.99..3.99 rows=12 width=30) (actual time=0.198..0.199 rows=22 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
16. 0.093 0.177 ↓ 1.8 22 3 / 3

Hash Join (cost=1.07..3.99 rows=12 width=30) (actual time=0.045..0.177 rows=22 loops=3)

  • Hash Cond: (nation.n_regionkey = region.r_regionkey)
17. 0.064 0.064 ↑ 1.0 62 3 / 3

Seq Scan on nation_102009 nation (cost=0.00..2.62 rows=62 width=34) (actual time=0.008..0.064 rows=62 loops=3)

18. 0.007 0.020 ↑ 1.0 1 3 / 3

Hash (cost=1.06..1.06 rows=1 width=4) (actual time=0.019..0.020 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
19. 0.013 0.013 ↑ 1.0 1 3 / 3

Seq Scan on region_102008 region (cost=0.00..1.06 rows=1 width=4) (actual time=0.011..0.013 rows=1 loops=3)

  • Filter: (r_name ~~ 'Europ%'::text)
  • Rows Removed by Filter: 4
Planning time : 1.178 ms
Execution time : 1,311.196 ms