explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Krng

Settings
# exclusive inclusive rows x rows loops node
1. 24.282 10,544.204 ↓ 199.2 2,789 1

Sort (cost=374,659.10..374,659.14 rows=14 width=755) (actual time=10,542.978..10,544.204 rows=2,789 loops=1)

  • Sort Key: expediente0_.idexpediente DESC
  • Sort Method: quicksort Memory: 2,131kB
2. 5.934 10,519.922 ↓ 199.2 2,789 1

Subquery Scan on expediente0_ (cost=131.27..374,658.84 rows=14 width=755) (actual time=10.648..10,519.922 rows=2,789 loops=1)

  • Filter: ((expediente0_.visible)::integer = 1)
  • Rows Removed by Filter: 159
3. 3,862.716 10,513.988 ↓ 1.0 2,948 1

Hash Left Join (cost=131.27..374,622.62 rows=2,897 width=755) (actual time=10.646..10,513.988 rows=2,948 loops=1)

  • Hash Cond: ((exp.idtipoingresoexpediente)::integer = (tie.idtipoingresoexpediente)::integer)
4. 6.953 156.799 ↓ 1.0 2,948 1

Hash Left Join (cost=130.11..59,121.36 rows=2,897 width=582) (actual time=3.947..156.799 rows=2,948 loops=1)

  • Hash Cond: ((exp.idsituacionexpediente)::integer = (se.idsituacionexpediente)::integer)
5. 7.130 149.809 ↓ 1.0 2,948 1

Nested Loop Left Join (cost=128.87..59,109.58 rows=2,897 width=550) (actual time=3.896..149.809 rows=2,948 loops=1)

6. 7.360 139.731 ↓ 1.0 2,948 1

Nested Loop Left Join (cost=128.44..39,515.45 rows=2,897 width=529) (actual time=3.887..139.731 rows=2,948 loops=1)

7. 8.376 129.423 ↓ 1.0 2,948 1

Nested Loop Left Join (cost=128.01..19,921.31 rows=2,897 width=508) (actual time=3.874..129.423 rows=2,948 loops=1)

8. 11.959 73.879 ↓ 1.0 2,948 1

Hash Left Join (cost=127.58..327.18 rows=2,897 width=487) (actual time=3.821..73.879 rows=2,948 loops=1)

  • Hash Cond: ((exp.iddependenciadefensoria)::integer = (ded.iddependenciajudicial)::integer)
9. 8.904 61.069 ↓ 1.0 2,948 1

Hash Join (cost=102.74..294.73 rows=2,897 width=458) (actual time=2.952..61.069 rows=2,948 loops=1)

  • Hash Cond: ((exp.idultimaubicacionfisica)::integer = (deuf.iddependenciajudicial)::integer)
10. 10.148 51.522 ↓ 1.0 2,948 1

Hash Join (cost=77.90..262.24 rows=2,897 width=429) (actual time=2.294..51.522 rows=2,948 loops=1)

  • Hash Cond: ((exp.idultimaradicacion)::integer = (deu.iddependenciajudicial)::integer)
11. 6.822 40.815 ↓ 1.0 2,948 1

Hash Join (cost=53.06..229.75 rows=2,897 width=400) (actual time=1.721..40.815 rows=2,948 loops=1)

  • Hash Cond: ((exp.iddependenciaalta)::integer = (dea.iddependenciajudicial)::integer)
12. 6.409 33.282 ↓ 1.0 2,948 1

Hash Join (cost=28.22..197.27 rows=2,897 width=371) (actual time=0.997..33.282 rows=2,948 loops=1)

  • Hash Cond: ((exp.iddeporigen)::integer = (deo.iddependenciajudicial)::integer)
13. 6.104 26.072 ↓ 1.0 2,948 1

Hash Left Join (cost=3.38..164.78 rows=2,897 width=342) (actual time=0.172..26.072 rows=2,948 loops=1)

  • Hash Cond: ((exp.idinstancia)::integer = (ins.idinstancia)::integer)
14. 6.009 19.939 ↓ 1.0 2,948 1

Hash Join (cost=2.31..149.16 rows=2,897 width=310) (actual time=0.127..19.939 rows=2,948 loops=1)

  • Hash Cond: ((exp.idproceso)::integer = (pro.idproceso)::integer)
15. 10.380 13.890 ↓ 1.0 2,948 1

Hash Join (cost=1.11..137.13 rows=2,897 width=278) (actual time=0.072..13.890 rows=2,948 loops=1)

  • Hash Cond: ((exp.idestadoexpediente)::integer = (ese.idestadoexpediente)::integer)
16. 3.473 3.473 ↓ 1.0 2,948 1

Seq Scan on t_expedientes exp (cost=0.00..121.97 rows=2,897 width=246) (actual time=0.016..3.473 rows=2,948 loops=1)

17. 0.009 0.037 ↑ 1.0 5 1

Hash (cost=1.05..1.05 rows=5 width=36) (actual time=0.035..0.037 rows=5 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
18. 0.028 0.028 ↑ 1.0 5 1

Seq Scan on t_estadosexpedientes ese (cost=0.00..1.05 rows=5 width=36) (actual time=0.025..0.028 rows=5 loops=1)

19. 0.015 0.040 ↓ 1.4 13 1

Hash (cost=1.09..1.09 rows=9 width=36) (actual time=0.039..0.040 rows=13 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
20. 0.025 0.025 ↓ 1.4 13 1

Seq Scan on t_procesos pro (cost=0.00..1.09 rows=9 width=36) (actual time=0.018..0.025 rows=13 loops=1)

21. 0.012 0.029 ↑ 1.0 3 1

Hash (cost=1.03..1.03 rows=3 width=36) (actual time=0.027..0.029 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
22. 0.017 0.017 ↑ 1.0 3 1

Seq Scan on t_instancias ins (cost=0.00..1.03 rows=3 width=36) (actual time=0.014..0.017 rows=3 loops=1)

23. 0.425 0.801 ↓ 1.0 711 1

Hash (cost=16.04..16.04 rows=704 width=33) (actual time=0.800..0.801 rows=711 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 55kB
24. 0.376 0.376 ↓ 1.0 711 1

Seq Scan on t_dependenciasjudiciales deo (cost=0.00..16.04 rows=704 width=33) (actual time=0.007..0.376 rows=711 loops=1)

25. 0.382 0.711 ↓ 1.0 711 1

Hash (cost=16.04..16.04 rows=704 width=33) (actual time=0.709..0.711 rows=711 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 55kB
26. 0.329 0.329 ↓ 1.0 711 1

Seq Scan on t_dependenciasjudiciales dea (cost=0.00..16.04 rows=704 width=33) (actual time=0.003..0.329 rows=711 loops=1)

27. 0.299 0.559 ↓ 1.0 711 1

Hash (cost=16.04..16.04 rows=704 width=33) (actual time=0.558..0.559 rows=711 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 55kB
28. 0.260 0.260 ↓ 1.0 711 1

Seq Scan on t_dependenciasjudiciales deu (cost=0.00..16.04 rows=704 width=33) (actual time=0.003..0.260 rows=711 loops=1)

29. 0.309 0.643 ↓ 1.0 711 1

Hash (cost=16.04..16.04 rows=704 width=33) (actual time=0.642..0.643 rows=711 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 55kB
30. 0.334 0.334 ↓ 1.0 711 1

Seq Scan on t_dependenciasjudiciales deuf (cost=0.00..16.04 rows=704 width=33) (actual time=0.026..0.334 rows=711 loops=1)

31. 0.473 0.851 ↓ 1.0 711 1

Hash (cost=16.04..16.04 rows=704 width=33) (actual time=0.850..0.851 rows=711 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 55kB
32. 0.378 0.378 ↓ 1.0 711 1

Seq Scan on t_dependenciasjudiciales ded (cost=0.00..16.04 rows=704 width=33) (actual time=0.006..0.378 rows=711 loops=1)

33. 47.168 47.168 ↑ 1.0 1 2,948

Index Scan using ix_personasfisicas_1 on t_personasfisicas pf (cost=0.43..6.75 rows=1 width=25) (actual time=0.015..0.016 rows=1 loops=2,948)

  • Index Cond: ((exp.idpersona)::integer = (idpersona)::integer)
34. 2.948 2.948 ↓ 0.0 0 2,948

Index Scan using ix_personasfisicas_1 on t_personasfisicas pfj (cost=0.43..6.75 rows=1 width=25) (actual time=0.001..0.001 rows=0 loops=2,948)

  • Index Cond: ((exp.idpersonajuez)::integer = (idpersona)::integer)
35. 2.948 2.948 ↓ 0.0 0 2,948

Index Scan using ix_personasfisicas_1 on t_personasfisicas pff (cost=0.43..6.75 rows=1 width=25) (actual time=0.001..0.001 rows=0 loops=2,948)

  • Index Cond: ((exp.idpersonafiscal)::integer = (idpersona)::integer)
36. 0.015 0.037 ↓ 1.4 15 1

Hash (cost=1.11..1.11 rows=11 width=36) (actual time=0.036..0.037 rows=15 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
37. 0.022 0.022 ↓ 1.4 15 1

Seq Scan on t_situacionesexpedientes se (cost=0.00..1.11 rows=11 width=36) (actual time=0.014..0.022 rows=15 loops=1)

38. 0.010 0.029 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=36) (actual time=0.027..0.029 rows=7 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
39. 0.019 0.019 ↑ 1.0 7 1

Seq Scan on t_tiposingresoexpedientes tie (cost=0.00..1.07 rows=7 width=36) (actual time=0.015..0.019 rows=7 loops=1)

40.          

SubPlan (for Hash Left Join)

41. 11.792 20.636 ↓ 0.0 0 2,948

Nested Loop (cost=4.51..89.51 rows=9 width=4) (actual time=0.007..0.007 rows=0 loops=2,948)

42. 2.948 8.844 ↓ 0.0 0 2,948

Bitmap Heap Scan on t_incidentes i (cost=4.22..14.76 rows=9 width=4) (actual time=0.003..0.003 rows=0 loops=2,948)

  • Recheck Cond: ((idexpedienteincidente)::integer = (exp.idexpediente)::integer)
43. 5.896 5.896 ↓ 0.0 0 2,948

Bitmap Index Scan on ix_fk_exp_inc_400098 (cost=0.00..4.22 rows=9 width=0) (actual time=0.002..0.002 rows=0 loops=2,948)

  • Index Cond: ((idexpedienteincidente)::integer = (exp.idexpediente)::integer)
44. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_gestiones on t_gestiones g (cost=0.29..8.30 rows=1 width=8) (never executed)

  • Index Cond: ((idgestion)::integer = (i.idgestion)::integer)
45. 6,473.808 6,473.808 ↑ 1.0 1 2,948

Index Scan using ix_fk_exp_ges_400044 on t_gestiones g_1 (cost=0.29..18.61 rows=1 width=0) (actual time=2.196..2.196 rows=1 loops=2,948)

  • Index Cond: ((idexpediente)::integer = (exp.idexpediente)::integer)
  • Filter: ((exp.spc_f_expedientepermisos_verifica(exp.idexpediente, idgestion, ('GESTION_VER'::character varying(50))::pub.descripcion))::integer = 1)
  • Rows Removed by Filter: 0
Planning time : 8.826 ms