explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Rjqh : Optimization for: plan #sCqw

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 29.535 59.117 ↑ 1.0 5,301 1

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

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

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

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

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

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

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

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

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

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

Seq Scan on imagen img (cost=0.00..551.63 rows=5,132 width=24) (actual time=0.233..1.503 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.179 14.057 ↑ 1.0 5,269 1

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

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

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

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

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

10. 2.270 10.664 ↑ 1.0 5,269 1

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

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

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

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

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

  • Filter: (bod_id = 1)
13. 3.239 5.807 ↑ 1.0 5,269 1

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

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

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

15. 0.104 0.215 ↑ 1.0 555 1

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

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

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

17. 0.749 1.333 ↑ 1.0 5,260 1

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

  • Buckets: 8,192 Batches: 1 Memory Usage: 249kB
18. 0.584 0.584 ↑ 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.021..0.584 rows=5,260 loops=1)

  • Heap Fetches: 0
19. 1.498 3.618 ↑ 1.0 5,260 1

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

  • Buckets: 8,192 Batches: 1 Memory Usage: 329kB
20. 1.765 2.120 ↑ 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.397..2.120 rows=5,260 loops=1)

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

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

  • Index Cond: (lpr_id = 1)