explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1.647 21.320 ↓ 1.0 2,802 1

Sort (cost=3,260.49..3,267.49 rows=2,799 width=333) (actual time=21.059..21.320 rows=2,802 loops=1)

  • Sort Key: cao.cao_orden
  • Sort Method: quicksort Memory: 844kB
2. 1.243 19.673 ↓ 1.0 2,802 1

Hash Left Join (cost=1,852.58..3,100.24 rows=2,799 width=333) (actual time=15.658..19.673 rows=2,802 loops=1)

  • Hash Cond: (pro.pro_id = pre.pro_id)
3. 1.455 18.245 ↑ 1.0 2,791 1

Hash Right Join (cost=1,824.09..3,026.82 rows=2,799 width=189) (actual time=15.457..18.245 rows=2,791 loops=1)

  • Hash Cond: (dlp.pro_id = pro.pro_id)
4. 1.397 1.612 ↑ 1.0 5,260 1

Bitmap Heap Scan on dlistapre dlp (cost=101.18..1,256.13 rows=5,276 width=16) (actual time=0.258..1.612 rows=5,260 loops=1)

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

Bitmap Index Scan on idx_dlistapre_lpr_id (cost=0.00..99.86 rows=5,276 width=0) (actual time=0.215..0.215 rows=5,260 loops=1)

  • Index Cond: (lpr_id = 3)
6. 0.923 15.178 ↑ 1.0 2,791 1

Hash (cost=1,687.98..1,687.98 rows=2,795 width=177) (actual time=15.178..15.178 rows=2,791 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 536kB
7. 1.330 14.255 ↑ 1.0 2,791 1

Hash Right Join (cost=1,089.88..1,687.98 rows=2,795 width=177) (actual time=11.974..14.255 rows=2,791 loops=1)

  • Hash Cond: (img.img_registro = pro.pro_id)
8. 1.175 1.175 ↓ 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.175 rows=5,199 loops=1)

  • Filter: ((tab_id = 209) AND (img_orden = 1) AND (tat_id = 1))
  • Rows Removed by Filter: 1,637
9. 0.939 11.750 ↑ 1.0 2,791 1

Hash (cost=1,054.94..1,054.94 rows=2,795 width=157) (actual time=11.750..11.750 rows=2,791 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 478kB
10. 1.369 10.811 ↑ 1.0 2,791 1

Hash Right Join (cost=684.42..1,054.94 rows=2,795 width=157) (actual time=8.904..10.811 rows=2,791 loops=1)

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

  • Heap Fetches: 0
12. 0.886 8.870 ↑ 1.0 2,791 1

Hash (cost=649.20..649.20 rows=2,795 width=157) (actual time=8.870..8.870 rows=2,791 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 478kB
13. 1.382 7.984 ↑ 1.0 2,791 1

Hash Right Join (cost=442.82..649.20 rows=2,795 width=157) (actual time=5.950..7.984 rows=2,791 loops=1)

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

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

  • Filter: (bod_id = 1)
15. 0.737 5.919 ↑ 1.0 2,791 1

Hash (cost=407.89..407.89 rows=2,795 width=153) (actual time=5.919..5.919 rows=2,791 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 461kB
16. 0.605 5.182 ↑ 1.0 2,791 1

Hash Right Join (cost=380.74..407.89 rows=2,795 width=153) (actual time=4.587..5.182 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.761 4.571 ↑ 1.0 2,791 1

Hash (cost=345.80..345.80 rows=2,795 width=117) (actual time=4.571..4.571 rows=2,791 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 441kB
19. 1.259 3.810 ↑ 1.0 2,791 1

Hash Join (cost=155.27..345.80 rows=2,795 width=117) (actual time=1.984..3.810 rows=2,791 loops=1)

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

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

21. 0.711 1.953 ↑ 1.0 2,791 1

Hash (cost=120.34..120.34 rows=2,795 width=8) (actual time=1.952..1.953 rows=2,791 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 142kB
22. 1.242 1.242 ↑ 1.0 2,791 1

Index Scan using idx_catalogo_orden_ubi_id on catalogo_orden cao (cost=0.42..120.34 rows=2,795 width=8) (actual time=0.117..1.242 rows=2,791 loops=1)

  • Index Cond: (ubi_id = 757)
23. 0.076 0.185 ↑ 1.0 555 1

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

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

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