explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fGvv

Settings
# exclusive inclusive rows x rows loops node
1. 101.960 15,977.998 ↑ 1.0 2,522 1

Hash Left Join (cost=845.01..3,533,744.90 rows=2,526 width=377) (actual time=75.342..15,977.998 rows=2,522 loops=1)

  • Hash Cond: (barrio.cod_city = city.id)
2. 24.622 185.711 ↑ 1.0 2,522 1

Hash Left Join (cost=829.40..1,161.48 rows=2,526 width=334) (actual time=71.656..185.711 rows=2,522 loops=1)

  • Hash Cond: (ubicacion.id_barrio = barrio.id_barrio)
3. 22.179 157.216 ↑ 1.0 2,522 1

Hash Left Join (cost=770.05..1,064.24 rows=2,526 width=320) (actual time=67.727..157.216 rows=2,522 loops=1)

  • Hash Cond: (planificacion.id_ubicacion = ubicacion.id_ubicacion)
4. 52.704 121.645 ↑ 1.0 2,522 1

Hash Join (cost=643.68..913.62 rows=2,526 width=233) (actual time=54.305..121.645 rows=2,522 loops=1)

  • Hash Cond: (periodo.id_planificacion = planificacion.id_planificacion)
5. 14.718 14.718 ↑ 1.0 9,912 1

Seq Scan on periodo (cost=0.00..195.12 rows=9,912 width=36) (actual time=0.006..14.718 rows=9,912 loops=1)

6. 3.880 54.223 ↑ 1.0 2,522 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 440kB
7. 8.415 50.343 ↑ 1.0 2,522 1

Hash Join (cost=108.80..612.11 rows=2,526 width=201) (actual time=10.283..50.343 rows=2,522 loops=1)

  • Hash Cond: (planificacion.id_unidad_operativa = unidad_operativa.id_unidad_operativa)
8. 7.735 41.750 ↑ 1.0 2,522 1

Nested Loop (cost=104.66..573.24 rows=2,526 width=185) (actual time=10.083..41.750 rows=2,522 loops=1)

9. 0.009 0.009 ↑ 1.0 1 1

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

  • Filter: (id_subestado = 2)
  • Rows Removed by Filter: 2
10. 4.185 34.006 ↑ 1.0 2,522 1

Hash Join (cost=104.66..546.94 rows=2,526 width=189) (actual time=10.072..34.006 rows=2,522 loops=1)

  • Hash Cond: (planificacion.id_estado = estado_planificacion.id_estado)
11. 4.983 29.808 ↑ 1.0 2,522 1

Hash Join (cost=103.57..511.12 rows=2,526 width=193) (actual time=10.039..29.808 rows=2,522 loops=1)

  • Hash Cond: (planificacion.id_especialiadad = especialidades.id_especialidades)
12. 4.142 15.225 ↑ 1.0 2,525 1

Hash Join (cost=40.96..413.76 rows=2,529 width=51) (actual time=0.415..15.225 rows=2,525 loops=1)

  • Hash Cond: (planificacion.id_modalidad = modalidad.id_modalidad)
13. 10.742 11.075 ↑ 1.0 2,535 1

Bitmap Heap Scan on planificacion (cost=39.91..377.89 rows=2,542 width=44) (actual time=0.390..11.075 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
14. 0.333 0.333 ↑ 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.333..0.333 rows=2,799 loops=1)

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

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

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

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

17. 5.191 9.600 ↓ 1.0 885 1

Hash (cost=51.58..51.58 rows=883 width=150) (actual time=9.600..9.600 rows=885 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 112kB
18. 2.806 4.409 ↓ 1.0 885 1

Hash Join (cost=4.61..51.58 rows=883 width=150) (actual time=0.311..4.409 rows=885 loops=1)

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

Seq Scan on especialidades (cost=0.00..34.83 rows=883 width=116) (actual time=0.008..1.318 rows=885 loops=1)

20. 0.057 0.285 ↑ 1.0 57 1

Hash (cost=3.89..3.89 rows=57 width=42) (actual time=0.285..0.285 rows=57 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 5kB
21. 0.123 0.228 ↑ 1.0 57 1

Hash Join (cost=1.54..3.89 rows=57 width=42) (actual time=0.080..0.228 rows=57 loops=1)

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

Seq Scan on areas (cost=0.00..1.57 rows=57 width=25) (actual time=0.003..0.046 rows=57 loops=1)

23. 0.032 0.059 ↑ 1.0 24 1

Hash (cost=1.24..1.24 rows=24 width=29) (actual time=0.059..0.059 rows=24 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 2kB
24. 0.027 0.027 ↑ 1.0 24 1

Seq Scan on programas_formacion_familias (cost=0.00..1.24 rows=24 width=29) (actual time=0.004..0.027 rows=24 loops=1)

25. 0.007 0.013 ↑ 1.0 4 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
26. 0.006 0.006 ↑ 1.0 4 1

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

27. 0.090 0.178 ↑ 1.0 95 1

Hash (cost=2.95..2.95 rows=95 width=22) (actual time=0.178..0.178 rows=95 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 6kB
28. 0.088 0.088 ↑ 1.0 95 1

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

29. 7.272 13.392 ↓ 1.0 3,006 1

Hash (cost=88.94..88.94 rows=2,994 width=95) (actual time=13.392..13.392 rows=3,006 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 381kB
30. 6.120 6.120 ↓ 1.0 3,006 1

Seq Scan on ubicacion (cost=0.00..88.94 rows=2,994 width=95) (actual time=0.006..6.120 rows=3,006 loops=1)

31. 2.001 3.873 ↓ 1.0 2,062 1

Hash (cost=33.60..33.60 rows=2,060 width=20) (actual time=3.873..3.873 rows=2,062 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 108kB
32. 1.872 1.872 ↓ 1.0 2,062 1

Seq Scan on barrio (cost=0.00..33.60 rows=2,060 width=20) (actual time=0.007..1.872 rows=2,062 loops=1)

33. 0.253 0.965 ↑ 1.0 254 1

Hash (cost=12.44..12.44 rows=254 width=51) (actual time=0.965..0.965 rows=254 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
34. 0.483 0.712 ↑ 1.0 254 1

Hash Left Join (cost=1.41..12.44 rows=254 width=51) (actual time=0.075..0.712 rows=254 loops=1)

  • Hash Cond: (city.distrito_id = distritos.id)
35. 0.181 0.181 ↑ 1.0 254 1

Seq Scan on city (cost=0.00..7.54 rows=254 width=48) (actual time=0.005..0.181 rows=254 loops=1)

36. 0.025 0.048 ↑ 1.0 18 1

Hash (cost=1.18..1.18 rows=18 width=19) (actual time=0.048..0.048 rows=18 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
37. 0.023 0.023 ↑ 1.0 18 1

Seq Scan on distritos (cost=0.00..1.18 rows=18 width=19) (actual time=0.005..0.023 rows=18 loops=1)

38.          

SubPlan (forHash Left Join)

39. 83.226 15,689.362 ↑ 1.0 1 2,522

Aggregate (cost=1,398.44..1,398.45 rows=1 width=8) (actual time=6.220..6.221 rows=1 loops=2,522)

40. 15,606.136 15,606.136 ↑ 1.6 16 2,522

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

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