explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6CIM : Optimization for: Optimization for: plan #sCqw; plan #Rjqh

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 47.191 77.883 ↑ 1.0 5,301 1

Sort (cost=3,441.66..3,454.96 rows=5,318 width=329) (actual time=77.030..77.883 rows=5,301 loops=1)

  • Sort Key: pro.pro_nombre
  • Sort Method: quicksort Memory: 1,607kB
2. 4.178 30.692 ↑ 1.0 5,301 1

Hash Left Join (cost=2,319.10..3,112.57 rows=5,318 width=329) (actual time=17.255..30.692 rows=5,301 loops=1)

  • Hash Cond: (pro.pro_id = dlp.pro_id)
3. 2.262 23.277 ↓ 1.0 5,301 1

Hash Left Join (cost=995.64..1,722.09 rows=5,269 width=186) (actual time=13.945..23.277 rows=5,301 loops=1)

  • Hash Cond: (pro.pro_id = pdb.pro_id)
4. 1.564 19.617 ↓ 1.0 5,301 1

Hash Left Join (cost=606.71..1,260.80 rows=5,269 width=186) (actual time=12.501..19.617 rows=5,301 loops=1)

  • Hash Cond: (pro.pro_id = pre.pro_id)
5. 3.759 17.825 ↑ 1.0 5,269 1

Hash Right Join (cost=578.22..1,200.42 rows=5,269 width=173) (actual time=12.255..17.825 rows=5,269 loops=1)

  • Hash Cond: (img.img_registro = pro.pro_id)
6. 2.062 2.062 ↓ 1.0 5,199 1

Seq Scan on imagen img (cost=0.00..551.63 rows=5,132 width=24) (actual time=0.233..2.062 rows=5,199 loops=1)

  • Filter: ((tab_id = 209) AND (img_orden = 1) AND (tat_id = 1))
  • Rows Removed by Filter: 1,637
7. 2.305 12.004 ↑ 1.0 5,269 1

Hash (cost=512.36..512.36 rows=5,269 width=153) (actual time=12.004..12.004 rows=5,269 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 880kB
8. 1.456 9.699 ↑ 1.0 5,269 1

Hash Right Join (cost=480.98..512.36 rows=5,269 width=153) (actual time=8.257..9.699 rows=5,269 loops=1)

  • Hash Cond: (dpet.pro_id = pro.pro_id)
9. 0.006 0.006 ↓ 0.0 0 1

Seq Scan on dpedido_tmp dpet (cost=0.00..19.00 rows=900 width=40) (actual time=0.006..0.006 rows=0 loops=1)

10. 2.110 8.237 ↑ 1.0 5,269 1

Hash (cost=415.12..415.12 rows=5,269 width=117) (actual time=8.236..8.237 rows=5,269 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 845kB
11. 1.726 6.127 ↑ 1.0 5,269 1

Hash Right Join (cost=242.55..415.12 rows=5,269 width=117) (actual time=3.728..6.127 rows=5,269 loops=1)

  • Hash Cond: (sal.pro_id = pro.pro_id)
12. 0.709 0.709 ↑ 1.0 5,260 1

Seq Scan on saldoinv sal (cost=0.00..158.75 rows=5,260 width=8) (actual time=0.022..0.709 rows=5,260 loops=1)

  • Filter: (bod_id = 1)
13. 2.006 3.692 ↑ 1.0 5,269 1

Hash (cost=176.69..176.69 rows=5,269 width=113) (actual time=3.691..3.692 rows=5,269 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 821kB
14. 1.686 1.686 ↑ 1.0 5,269 1

Seq Scan on producto pro (cost=0.00..176.69 rows=5,269 width=113) (actual time=0.011..1.686 rows=5,269 loops=1)

15. 0.104 0.228 ↑ 1.0 555 1

Hash (cost=21.55..21.55 rows=555 width=17) (actual time=0.228..0.228 rows=555 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 37kB
16. 0.124 0.124 ↑ 1.0 555 1

Seq Scan on preventa pre (cost=0.00..21.55 rows=555 width=17) (actual time=0.006..0.124 rows=555 loops=1)

17. 0.770 1.398 ↑ 1.0 5,260 1

Hash (cost=323.18..323.18 rows=5,260 width=4) (actual time=1.398..1.398 rows=5,260 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 249kB
18. 0.628 0.628 ↑ 1.0 5,260 1

Index Only Scan using idx_producto_diccionario_busqueda_pro_id on producto_diccionario_busqueda pdb (cost=0.28..323.18 rows=5,260 width=4) (actual time=0.016..0.628 rows=5,260 loops=1)

  • Heap Fetches: 0
19. 1.079 3.237 ↑ 1.0 5,260 1

Hash (cost=1,256.98..1,256.98 rows=5,318 width=16) (actual time=3.237..3.237 rows=5,260 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 329kB
20. 1.756 2.158 ↑ 1.0 5,260 1

Bitmap Heap Scan on dlistapre dlp (cost=101.50..1,256.98 rows=5,318 width=16) (actual time=0.447..2.158 rows=5,260 loops=1)

  • Recheck Cond: (lpr_id = 1)
  • Heap Blocks: exact=450
21. 0.402 0.402 ↑ 1.0 5,260 1

Bitmap Index Scan on idx_dlistapre_lpr_id (cost=0.00..100.17 rows=5,318 width=0) (actual time=0.402..0.402 rows=5,260 loops=1)

  • Index Cond: (lpr_id = 1)