explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kGYH

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 1,350.900 2,028.333 ↓ 220.5 3,618,099 1

Nested Loop (cost=454.71..58,877.28 rows=16,409 width=427) (actual time=1.269..2,028.333 rows=3,618,099 loops=1)

2. 3.431 14.520 ↓ 219.0 219 1

Nested Loop (cost=9.94..307.53 rows=1 width=315) (actual time=0.088..14.520 rows=219 loops=1)

3. 0.871 6.709 ↓ 219.0 219 1

Nested Loop (cost=9.94..303.50 rows=1 width=257) (actual time=0.075..6.709 rows=219 loops=1)

4. 0.860 1.239 ↓ 6.1 219 1

Hash Join (cost=9.52..35.46 rows=36 width=263) (actual time=0.057..1.239 rows=219 loops=1)

  • Hash Cond: (p2.majordecode = p1.row8)
5. 0.349 0.349 ↑ 1.0 219 1

Index Scan using page2_cat_id_idx on page2 p2 (cost=0.42..18.07 rows=219 width=22) (actual time=0.019..0.349 rows=219 loops=1)

  • Index Cond: (cat_id = 21)
6. 0.012 0.030 ↑ 1.0 27 1

Hash (cost=8.76..8.76 rows=27 width=250) (actual time=0.029..0.030 rows=27 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
7. 0.018 0.018 ↑ 1.0 27 1

Index Scan using page1_cat_id_idx on page1 p1 (cost=0.29..8.76 rows=27 width=250) (actual time=0.010..0.018 rows=27 loops=1)

  • Index Cond: (cat_id = 21)
8. 4.599 4.599 ↑ 1.0 1 219

Index Only Scan using f1f2_cat_id_sect_idx on f1f2 f (cost=0.42..7.44 rows=1 width=14) (actual time=0.019..0.021 rows=1 loops=219)

  • Index Cond: ((cat_id = 21) AND (sect = p2.row1))
  • Heap Fetches: 219
9. 4.380 4.380 ↑ 1.0 1 219

Seq Scan on part1a p1a (cost=0.00..4.03 rows=1 width=58) (actual time=0.005..0.020 rows=1 loops=219)

  • Filter: (cat_id = 21)
  • Rows Removed by Filter: 161
10. 503.262 662.913 ↑ 1.2 16,521 219

Bitmap Heap Scan on part2 d (cost=444.77..58,378.35 rows=19,140 width=68) (actual time=0.790..3.027 rows=16,521 loops=219)

  • Recheck Cond: (cat_id = 21)
  • Heap Blocks: exact=147606
11. 159.651 159.651 ↑ 1.2 16,521 219

Bitmap Index Scan on part2_cat_id_f1_f2_idx (cost=0.00..439.98 rows=19,140 width=0) (actual time=0.729..0.729 rows=16,521 loops=219)

  • Index Cond: (cat_id = 21)
Planning time : 6.213 ms
Execution time : 2,124.788 ms