explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 2.272 22.302 ↓ 1.2 2,802 1

Sort (cost=3,220.42..3,226.16 rows=2,296 width=333) (actual time=21.987..22.302 rows=2,802 loops=1)

  • Sort Key: cao.cao_orden
  • Sort Method: quicksort Memory: 844kB
2. 1.374 20.030 ↓ 1.2 2,802 1

Hash Left Join (cost=1,859.18..3,092.24 rows=2,296 width=333) (actual time=15.556..20.030 rows=2,802 loops=1)

  • Hash Cond: (pro.pro_id = pre.pro_id)
3. 1.699 18.448 ↓ 1.2 2,791 1

Hash Right Join (cost=1,830.69..3,026.90 rows=2,296 width=189) (actual time=15.334..18.448 rows=2,791 loops=1)

  • Hash Cond: (dlp.pro_id = pro.pro_id)
4. 1.476 1.690 ↓ 1.0 5,260 1

Bitmap Heap Scan on dlistapre dlp (cost=100.61..1,254.63 rows=5,202 width=16) (actual time=0.256..1.690 rows=5,260 loops=1)

  • Recheck Cond: (lpr_id = 3)
  • Heap Blocks: exact=449
5. 0.214 0.214 ↓ 1.0 5,260 1

Bitmap Index Scan on idx_dlistapre_lpr_id (cost=0.00..99.31 rows=5,202 width=0) (actual time=0.214..0.214 rows=5,260 loops=1)

  • Index Cond: (lpr_id = 3)
6. 0.860 15.059 ↓ 1.2 2,791 1

Hash (cost=1,701.39..1,701.39 rows=2,296 width=177) (actual time=15.059..15.059 rows=2,791 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 536kB
7. 1.244 14.199 ↓ 1.2 2,791 1

Hash Right Join (cost=1,108.15..1,701.39 rows=2,296 width=177) (actual time=12.046..14.199 rows=2,791 loops=1)

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

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

  • Filter: ((tab_id = 209) AND (img_orden = 1) AND (tat_id = 1))
  • Rows Removed by Filter: 1,637
9. 1.208 11.805 ↓ 1.2 2,791 1

Hash (cost=1,079.45..1,079.45 rows=2,296 width=157) (actual time=11.805..11.805 rows=2,791 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 478kB
10. 1.771 10.597 ↓ 1.2 2,791 1

Hash Right Join (cost=713.91..1,079.45 rows=2,296 width=157) (actual time=8.102..10.597 rows=2,791 loops=1)

  • Hash Cond: (pdb.pro_id = pro.pro_id)
11. 0.752 0.752 ↑ 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.014..0.752 rows=5,260 loops=1)

  • Heap Fetches: 0
12. 0.982 8.074 ↓ 1.2 2,791 1

Hash (cost=684.92..684.92 rows=2,296 width=157) (actual time=8.074..8.074 rows=2,791 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 478kB
13. 1.496 7.092 ↓ 1.2 2,791 1

Hash Right Join (cost=483.53..684.92 rows=2,296 width=157) (actual time=4.866..7.092 rows=2,791 loops=1)

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

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

  • Filter: (bod_id = 1)
15. 0.781 4.833 ↓ 1.2 2,791 1

Hash (cost=454.83..454.83 rows=2,296 width=153) (actual time=4.833..4.833 rows=2,791 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 461kB
16. 0.665 4.052 ↓ 1.2 2,791 1

Hash Right Join (cost=428.53..454.83 rows=2,296 width=153) (actual time=3.395..4.052 rows=2,791 loops=1)

  • Hash Cond: (dpet.pro_id = pro.pro_id)
17. 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)

18. 0.766 3.381 ↓ 1.2 2,791 1

Hash (cost=399.83..399.83 rows=2,296 width=117) (actual time=3.381..3.381 rows=2,791 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 441kB
19. 1.284 2.615 ↓ 1.2 2,791 1

Hash Join (cost=209.30..399.83 rows=2,296 width=117) (actual time=0.750..2.615 rows=2,791 loops=1)

  • Hash Cond: (pro.pro_id = cao.pro_id)
20. 0.600 0.600 ↑ 1.0 5,269 1

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

21. 0.333 0.731 ↓ 1.2 2,791 1

Hash (cost=180.60..180.60 rows=2,296 width=8) (actual time=0.730..0.731 rows=2,791 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 142kB
22. 0.398 0.398 ↓ 1.2 2,791 1

Index Only Scan using idx_catalogo_orden_ubi_id_pro_id_orden on catalogo_orden cao (cost=0.42..180.60 rows=2,296 width=8) (actual time=0.013..0.398 rows=2,791 loops=1)

  • Index Cond: (ubi_id = 757)
  • Heap Fetches: 0
23. 0.089 0.208 ↑ 1.0 555 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 37kB
24. 0.119 0.119 ↑ 1.0 555 1

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