explain.depesz.com

PostgreSQL's explain analyze made readable

Result: P4ZF

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 44.562 101.146 ↑ 1.0 5,213 1

Sort (cost=4,506.95..4,520.01 rows=5,222 width=279) (actual time=100.706..101.146 rows=5,213 loops=1)

  • Sort Key: cao.cao_orden, pro.pro_nombre
  • Sort Method: quicksort Memory: 1559kB
2. 3.370 56.584 ↑ 1.0 5,213 1

Hash Left Join (cost=1,820.18..4,184.48 rows=5,222 width=279) (actual time=35.294..56.584 rows=5,213 loops=1)

  • Hash Cond: (pro.pro_id = sal.pro_id)
3. 13.214 51.850 ↑ 1.0 5,213 1

Hash Right Join (cost=1,688.86..3,974.48 rows=5,222 width=128) (actual time=33.882..51.850 rows=5,213 loops=1)

  • Hash Cond: ((dlp.lpr_id = cli.lpr_id) AND (dlp.pro_id = pro.pro_id))
4. 5.866 5.866 ↑ 1.0 52,080 1

Seq Scan on dlistapre dlp (cost=0.00..1,842.80 rows=52,080 width=20) (actual time=1.072..5.866 rows=52,080 loops=1)

5. 3.031 32.770 ↑ 1.0 5,213 1

Hash (cost=1,610.66..1,610.66 rows=5,213 width=120) (actual time=32.770..32.770 rows=5,213 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 819kB
6. 5.458 29.739 ↑ 1.0 5,213 1

Hash Right Join (cost=897.44..1,610.66 rows=5,213 width=120) (actual time=22.146..29.739 rows=5,213 loops=1)

  • Hash Cond: ((cao.ubi_id = cli.canton_id) AND (cao.pro_id = pro.pro_id))
7. 4.562 4.562 ↑ 1.0 24,773 1

Seq Scan on catalogo_orden cao (cost=0.00..524.73 rows=24,773 width=12) (actual time=0.025..4.562 rows=24,773 loops=1)

8. 2.940 19.719 ↑ 1.0 5,213 1

Hash (cost=819.25..819.25 rows=5,213 width=120) (actual time=19.719..19.719 rows=5,213 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 836kB
9. 2.292 16.779 ↑ 1.0 5,213 1

Nested Loop Left Join (cost=720.49..819.25 rows=5,213 width=120) (actual time=12.750..16.779 rows=5,213 loops=1)

10. 1.810 14.487 ↑ 1.0 5,213 1

Hash Right Join (cost=720.22..751.59 rows=5,213 width=112) (actual time=12.711..14.487 rows=5,213 loops=1)

  • Hash Cond: (dpet.pro_id = pro.pro_id)
11. 0.011 0.011 ↓ 0.0 0 1

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

12. 2.843 12.666 ↑ 1.0 5,213 1

Hash (cost=655.05..655.05 rows=5,213 width=112) (actual time=12.666..12.666 rows=5,213 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 795kB
13. 3.312 9.823 ↑ 1.0 5,213 1

Hash Right Join (cost=281.29..655.05 rows=5,213 width=112) (actual time=5.605..9.823 rows=5,213 loops=1)

  • Hash Cond: (pdb.pro_id = pro.pro_id)
14. 0.963 0.963 ↑ 1.0 5,208 1

Seq Scan on producto_diccionario_busqueda pdb (cost=0.00..360.08 rows=5,208 width=4) (actual time=0.011..0.963 rows=5,208 loops=1)

15. 2.903 5.548 ↑ 1.0 5,213 1

Hash (cost=216.13..216.13 rows=5,213 width=112) (actual time=5.547..5.548 rows=5,213 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 795kB
16. 2.645 2.645 ↑ 1.0 5,213 1

Seq Scan on producto pro (cost=0.00..216.13 rows=5,213 width=112) (actual time=0.016..2.645 rows=5,213 loops=1)

17. 0.000 0.000 ↑ 1.0 1 5,213

Materialize (cost=0.28..2.50 rows=1 width=8) (actual time=0.000..0.000 rows=1 loops=5,213)

18. 0.028 0.028 ↑ 1.0 1 1

Index Scan using pk_cliente on cliente cli (cost=0.28..2.49 rows=1 width=8) (actual time=0.027..0.028 rows=1 loops=1)

  • Index Cond: (cli_id = 922)
19. 0.678 1.364 ↑ 1.0 3,293 1

Hash (cost=90.16..90.16 rows=3,293 width=8) (actual time=1.364..1.364 rows=3,293 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 172kB
20. 0.686 0.686 ↑ 1.0 3,293 1

Seq Scan on saldoinv sal (cost=0.00..90.16 rows=3,293 width=8) (actual time=0.045..0.686 rows=3,293 loops=1)

  • Filter: (bod_id = 1)
Planning time : 1.228 ms
Execution time : 102.730 ms