explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jUbs

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 7,003.623 7,021.792 ↓ 4.4 22 1

Nested Loop (cost=1.42..187,693.15 rows=5 width=791) (actual time=371.284..7,021.792 rows=22 loops=1)

2. 17.443 17.443 ↓ 4.4 22 1

Index Scan using pk_dbu_id on dbulto dbu (cost=0.29..1,222.84 rows=5 width=34) (actual time=16.975..17.443 rows=22 loops=1)

  • Filter: (cbu_id = 8435)
  • Rows Removed by Filter: 40522
3. 0.054 0.176 ↑ 1.0 1 22

Materialize (cost=1.13..9.08 rows=1 width=107) (actual time=0.003..0.008 rows=1 loops=22)

4. 0.007 0.122 ↑ 1.0 1 1

Nested Loop (cost=1.13..9.07 rows=1 width=107) (actual time=0.053..0.122 rows=1 loops=1)

5. 0.016 0.098 ↑ 1.0 1 1

Nested Loop (cost=0.85..8.75 rows=1 width=70) (actual time=0.044..0.098 rows=1 loops=1)

  • Join Filter: (cbu.cam_id = cam.cam_id)
  • Rows Removed by Join Filter: 9
6. 0.004 0.067 ↑ 1.0 1 1

Nested Loop (cost=0.85..7.52 rows=1 width=64) (actual time=0.030..0.067 rows=1 loops=1)

7. 0.008 0.046 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.57..5.01 rows=1 width=64) (actual time=0.023..0.046 rows=1 loops=1)

8. 0.021 0.021 ↑ 1.0 1 1

Index Scan using pk_cbu_id on cbulto cbu (cost=0.29..2.50 rows=1 width=28) (actual time=0.012..0.021 rows=1 loops=1)

  • Index Cond: (cbu_id = 8435)
9. 0.017 0.017 ↑ 1.0 1 1

Index Scan using pk_direccion on direccion dir (cost=0.28..2.50 rows=1 width=44) (actual time=0.006..0.017 rows=1 loops=1)

  • Index Cond: (cbu.dir_id = dir_id)
10. 0.017 0.017 ↑ 1.0 1 1

Index Scan using idx_clu_cliente on cliente cli (cost=0.28..2.50 rows=1 width=12) (actual time=0.005..0.017 rows=1 loops=1)

  • Index Cond: (cli_id = cbu.cli_id)
11. 0.015 0.015 ↑ 1.0 10 1

Seq Scan on camion cam (cost=0.00..1.10 rows=10 width=14) (actual time=0.010..0.015 rows=10 loops=1)

12. 0.017 0.017 ↑ 1.0 1 1

Index Scan using pk_entidad on entidad ent (cost=0.28..0.32 rows=1 width=45) (actual time=0.006..0.017 rows=1 loops=1)

  • Index Cond: (ent_id = cli.ent_id)
13.          

SubPlan (forNested Loop)

14. 0.308 0.308 ↑ 1.0 1 22

Index Scan using ubicacion_pkey on ubicacion ubi2 (cost=0.15..2.37 rows=1 width=10) (actual time=0.013..0.014 rows=1 loops=22)

  • Index Cond: (ubi_id = cbu.ubi_id)
15. 0.176 0.176 ↑ 1.0 1 22

Seq Scan on bultos_packing bp (cost=0.00..1.06 rows=1 width=7) (actual time=0.006..0.008 rows=1 loops=22)

  • Filter: (bup_id = dbu.bup_id)
  • Rows Removed by Filter: 4
16. 0.000 0.066 ↓ 0.0 0 22

Index Scan using pk_usuario on usuario (cost=37,286.57..37,288.79 rows=1 width=5) (actual time=0.003..0.003 rows=0 loops=22)

  • Index Cond: (usu_id = $3)
17.          

Initplan (forIndex Scan)

18. 7,002.578 7,002.578 ↓ 0.0 0 22

Seq Scan on bitacora (cost=0.00..37,286.43 rows=1 width=4) (actual time=318.299..318.299 rows=0 loops=22)

  • Filter: ((tab_id = 120) AND (reg_id = cbu.cbu_id))
  • Rows Removed by Filter: 1644968