explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nw4T

Settings
# exclusive inclusive rows x rows loops node
1. 0.069 91,309.467 ↓ 2.5 10 1

Limit (cost=63,889.92..63,890.38 rows=4 width=229) (actual time=91,297.204..91,309.467 rows=10 loops=1)

2. 194.552 91,309.398 ↓ 2.5 10 1

Gather Merge (cost=63,889.92..63,890.38 rows=4 width=229) (actual time=91,297.200..91,309.398 rows=10 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
3. 0.185 91,114.846 ↓ 1.8 7 2 / 2

Sort (cost=62,889.91..62,889.92 rows=4 width=229) (actual time=91,114.841..91,114.846 rows=7 loops=2)

  • Sort Key: nation.n_name, supplier.su_name, item.i_id
  • Sort Method: quicksort Memory: 29kB
  • Worker 0: Sort Method: top-N heapsort Memory: 30kB
4. 0.417 91,114.661 ↓ 5.0 20 2 / 2

Hash Join (cost=2,344.39..62,889.87 rows=4 width=229) (actual time=2,353.169..91,114.661 rows=20 loops=2)

  • Hash Cond: (mod((stock.s_w_id * stock.s_i_id), '10000'::numeric) = (supplier.su_suppkey)::numeric)
5. 5.376 91,089.865 ↓ 36.0 36 2 / 2

Nested Loop (cost=1,880.40..62,424.77 rows=1 width=36) (actual time=2,328.713..91,089.865 rows=36 loops=2)

  • Join Filter: (item.i_id = stock.s_i_id)
6. 5.103 196.034 ↓ 188.0 752 2 / 2

Hash Join (cost=1,879.97..5,370.96 rows=4 width=71) (actual time=171.928..196.034 rows=752 loops=2)

  • Hash Cond: (item.i_id = ref_test.m_i_id)
7. 19.295 19.295 ↓ 125.5 753 2 / 2

Parallel Seq Scan on item_102491 item (cost=0.00..3,446.29 rows=6 width=25) (actual time=0.052..19.295 rows=753 loops=2)

  • Filter: ((i_data)::text ~~ '%b'::text)
  • Rows Removed by Filter: 49247
8. 92.120 171.636 ↓ 1.7 99,980 2 / 2

Hash (cost=1,136.10..1,136.10 rows=59,510 width=46) (actual time=171.635..171.636 rows=99,980 loops=2)

  • Buckets: 131072 (originally 65536) Batches: 1 (originally 1) Memory Usage: 5301kB
9. 79.516 79.516 ↓ 1.7 99,980 2 / 2

Seq Scan on ref_test_102492 ref_test (cost=0.00..1,136.10 rows=59,510 width=46) (actual time=0.015..79.516 rows=99,980 loops=2)

10. 90,888.455 90,888.455 ↓ 0.0 0 1,505 / 2

Index Scan using stock_i1_102298 on stock_102298 stock (cost=0.43..14,263.44 rows=1 width=16) (actual time=118.066..120.782 rows=0 loops=1,505)

  • Index Cond: (s_i_id = ref_test.m_i_id)
  • Filter: (ref_test.m_s_quantity = s_quantity)
  • Rows Removed by Filter: 19
11. 4.446 24.379 ↓ 1.8 3,572 2 / 2

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

  • Buckets: 4096 (originally 2048) Batches: 1 (originally 1) Memory Usage: 859kB
12. 11.681 19.933 ↓ 1.8 3,572 2 / 2

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

  • Hash Cond: (supplier.su_nationkey = nation.n_nationkey)
13. 8.078 8.078 ↑ 1.0 10,000 2 / 2

Seq Scan on supplier_102010 supplier (cost=0.00..378.00 rows=10,000 width=182) (actual time=0.012..8.078 rows=10,000 loops=2)

14. 0.024 0.174 ↓ 1.8 22 2 / 2

Hash (cost=3.99..3.99 rows=12 width=30) (actual time=0.173..0.174 rows=22 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
15. 0.078 0.150 ↓ 1.8 22 2 / 2

Hash Join (cost=1.07..3.99 rows=12 width=30) (actual time=0.040..0.150 rows=22 loops=2)

  • Hash Cond: (nation.n_regionkey = region.r_regionkey)
16. 0.053 0.053 ↑ 1.0 62 2 / 2

Seq Scan on nation_102009 nation (cost=0.00..2.62 rows=62 width=34) (actual time=0.007..0.053 rows=62 loops=2)

17. 0.006 0.019 ↑ 1.0 1 2 / 2

Hash (cost=1.06..1.06 rows=1 width=4) (actual time=0.018..0.019 rows=1 loops=2)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
18. 0.013 0.013 ↑ 1.0 1 2 / 2

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

  • Filter: (r_name ~~ 'Europ%'::text)
  • Rows Removed by Filter: 4
Planning time : 1.066 ms
Execution time : 91,309.681 ms