explain.depesz.com

PostgreSQL's explain analyze made readable

Result: WwYm

Settings
# exclusive inclusive rows x rows loops node
1. 71.827 13,407.253 ↑ 1.0 2,522 1

Hash Join (cost=643.68..3,542,686.43 rows=2,526 width=4) (actual time=48.433..13,407.253 rows=2,522 loops=1)

  • Hash Cond: (periodo.id_planificacion = planificacion.id_planificacion)
2. 17.886 17.886 ↓ 1.0 9,913 1

Seq Scan on periodo (cost=0.00..195.12 rows=9,912 width=4) (actual time=0.005..17.886 rows=9,913 loops=1)

3. 3.356 44.254 ↑ 1.0 2,522 1

Hash (cost=612.11..612.11 rows=2,526 width=4) (actual time=44.254..44.254 rows=2,522 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 89kB
4. 6.115 40.898 ↑ 1.0 2,522 1

Hash Join (cost=108.80..612.11 rows=2,526 width=4) (actual time=4.694..40.898 rows=2,522 loops=1)

  • Hash Cond: (planificacion.id_unidad_operativa = unidad_operativa.id_unidad_operativa)
5. 8.685 34.611 ↑ 1.0 2,522 1

Nested Loop (cost=104.66..573.24 rows=2,526 width=8) (actual time=4.502..34.611 rows=2,522 loops=1)

6. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on sub_estado (cost=0.00..1.04 rows=1 width=4) (actual time=0.006..0.010 rows=1 loops=1)

  • Filter: (id_subestado = 2)
  • Rows Removed by Filter: 2
7. 5.049 25.916 ↑ 1.0 2,522 1

Hash Join (cost=104.66..546.94 rows=2,526 width=12) (actual time=4.490..25.916 rows=2,522 loops=1)

  • Hash Cond: (planificacion.id_estado = estado_planificacion.id_estado)
8. 5.200 20.855 ↑ 1.0 2,522 1

Hash Join (cost=103.57..511.12 rows=2,526 width=16) (actual time=4.458..20.855 rows=2,522 loops=1)

  • Hash Cond: (planificacion.id_especialiadad = especialidades.id_especialidades)
9. 5.671 11.663 ↑ 1.0 2,525 1

Hash Join (cost=40.96..413.76 rows=2,529 width=20) (actual time=0.435..11.663 rows=2,525 loops=1)

  • Hash Cond: (planificacion.id_modalidad = modalidad.id_modalidad)
10. 5.626 5.984 ↑ 1.0 2,535 1

Bitmap Heap Scan on planificacion (cost=39.91..377.89 rows=2,542 width=28) (actual time=0.411..5.984 rows=2,535 loops=1)

  • Recheck Cond: (id_subestado = 2)
  • Filter: ((id_tipo_insc = 1) AND ((id_estado = 2) OR (id_estado = 3)))
  • Rows Removed by Filter: 264
11. 0.358 0.358 ↑ 1.0 2,799 1

Bitmap Index Scan on planificacion_id_subestado_idx (cost=0.00..39.28 rows=2,799 width=0) (actual time=0.358..0.358 rows=2,799 loops=1)

  • Index Cond: (id_subestado = 2)
12. 0.004 0.008 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=4) (actual time=0.008..0.008 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
13. 0.004 0.004 ↑ 1.0 2 1

Seq Scan on modalidad (cost=0.00..1.02 rows=2 width=4) (actual time=0.003..0.004 rows=2 loops=1)

14. 0.823 3.992 ↓ 1.0 885 1

Hash (cost=51.58..51.58 rows=883 width=8) (actual time=3.992..3.992 rows=885 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 35kB
15. 1.486 3.169 ↓ 1.0 885 1

Hash Join (cost=4.61..51.58 rows=883 width=8) (actual time=0.690..3.169 rows=885 loops=1)

  • Hash Cond: (especialidades.id_area = areas.id_areas)
16. 1.016 1.016 ↓ 1.0 885 1

Seq Scan on especialidades (cost=0.00..34.83 rows=883 width=12) (actual time=0.007..1.016 rows=885 loops=1)

17. 0.052 0.667 ↑ 1.0 57 1

Hash (cost=3.89..3.89 rows=57 width=8) (actual time=0.667..0.667 rows=57 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 3kB
18. 0.127 0.615 ↑ 1.0 57 1

Hash Join (cost=1.54..3.89 rows=57 width=8) (actual time=0.476..0.615 rows=57 loops=1)

  • Hash Cond: (areas.id_familia_profesional = programas_formacion_familias.id_prog_formacion)
19. 0.034 0.034 ↑ 1.0 57 1

Seq Scan on areas (cost=0.00..1.57 rows=57 width=12) (actual time=0.004..0.034 rows=57 loops=1)

20. 0.429 0.454 ↑ 1.0 24 1

Hash (cost=1.24..1.24 rows=24 width=8) (actual time=0.454..0.454 rows=24 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
21. 0.025 0.025 ↑ 1.0 24 1

Seq Scan on programas_formacion_familias (cost=0.00..1.24 rows=24 width=8) (actual time=0.003..0.025 rows=24 loops=1)

22. 0.005 0.012 ↑ 1.0 4 1

Hash (cost=1.04..1.04 rows=4 width=4) (actual time=0.012..0.012 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
23. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on estado_planificacion (cost=0.00..1.04 rows=4 width=4) (actual time=0.003..0.007 rows=4 loops=1)

24. 0.085 0.172 ↑ 1.0 95 1

Hash (cost=2.95..2.95 rows=95 width=2) (actual time=0.172..0.172 rows=95 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 4kB
25. 0.087 0.087 ↑ 1.0 95 1

Seq Scan on unidad_operativa (cost=0.00..2.95 rows=95 width=2) (actual time=0.004..0.087 rows=95 loops=1)

26.          

SubPlan (forHash Join)

27. 98.358 13,273.286 ↑ 1.0 1 2,522

Aggregate (cost=1,402.12..1,402.13 rows=1 width=8) (actual time=5.262..5.263 rows=1 loops=2,522)

28. 13,174.928 13,174.928 ↑ 1.6 16 2,522

Index Scan using inscripcion_alumno_id_alumno_id_planificacion_idx on inscripcion_alumno insxx (cost=0.42..1,402.05 rows=25 width=8) (actual time=2.107..5.224 rows=16 loops=2,522)

  • Index Cond: (id_planificacion = planificacion.id_planificacion)
  • Filter: (estado_inscripcion = 1)
  • Rows Removed by Filter: 8