explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EwvQ : Optimization for: plan #EPdd

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 30.670 58.527 ↓ 1.0 5,301 1

Sort (cost=3,438.87..3,452.10 rows=5,293 width=329) (actual time=57.906..58.527 rows=5,301 loops=1)

  • Sort Key: pro.pro_nombre
  • Sort Method: quicksort Memory: 1,607kB
2. 2.840 27.857 ↓ 1.0 5,301 1

Hash Left Join (cost=2,318.28..3,111.50 rows=5,293 width=329) (actual time=18.379..27.857 rows=5,301 loops=1)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

10. 2.521 11.045 ↑ 1.0 5,269 1

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

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

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

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

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

  • Filter: (bod_id = 1)
13. 2.181 4.373 ↑ 1.0 5,269 1

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

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

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

15. 0.079 0.180 ↑ 1.0 555 1

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

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

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

17. 0.630 1.234 ↑ 1.0 5,260 1

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

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

  • Heap Fetches: 0
19. 0.861 2.790 ↑ 1.0 5,260 1

Hash (cost=1,256.47..1,256.47 rows=5,293 width=16) (actual time=2.790..2.790 rows=5,260 loops=1)

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

Bitmap Heap Scan on dlistapre dlp (cost=101.31..1,256.47 rows=5,293 width=16) (actual time=0.251..1.929 rows=5,260 loops=1)

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

Bitmap Index Scan on idx_dlistapre_lpr_id (cost=0.00..99.99 rows=5,293 width=0) (actual time=0.209..0.209 rows=5,260 loops=1)

  • Index Cond: (lpr_id = 1)