explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Aii9

Settings
# exclusive inclusive rows x rows loops node
1. 31.779 387.427 ↑ 1.0 2,521 1

Hash Left Join (cost=911.98..170,932.80 rows=2,524 width=377) (actual time=55.606..387.427 rows=2,521 loops=1)

  • Hash Cond: (barrio.cod_city = city.id)
2. 6.544 94.822 ↑ 1.0 2,521 1

Hash Left Join (cost=896.36..1,228.42 rows=2,524 width=334) (actual time=54.221..94.822 rows=2,521 loops=1)

  • Hash Cond: (ubicacion.id_barrio = barrio.id_barrio)
3. 7.020 83.979 ↑ 1.0 2,521 1

Hash Left Join (cost=832.32..1,126.52 rows=2,524 width=320) (actual time=49.885..83.979 rows=2,521 loops=1)

  • Hash Cond: (planificacion.id_ubicacion = ubicacion.id_ubicacion)
4. 18.147 69.285 ↑ 1.0 2,521 1

Hash Join (cost=705.22..975.15 rows=2,524 width=233) (actual time=42.175..69.285 rows=2,521 loops=1)

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

Seq Scan on periodo (cost=0.00..195.13 rows=9,913 width=36) (actual time=0.013..9.061 rows=9,913 loops=1)

6. 5.047 42.077 ↑ 1.0 2,521 1

Hash (cost=673.67..673.67 rows=2,524 width=201) (actual time=42.077..42.077 rows=2,521 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 440kB
7. 5.195 37.030 ↑ 1.0 2,521 1

Hash Join (cost=170.51..673.67 rows=2,524 width=201) (actual time=7.241..37.030 rows=2,521 loops=1)

  • Hash Cond: (planificacion.id_unidad_operativa = unidad_operativa.id_unidad_operativa)
8. 4.198 30.466 ↑ 1.0 2,521 1

Nested Loop (cost=166.37..634.82 rows=2,524 width=185) (actual time=5.850..30.466 rows=2,521 loops=1)

9. 0.011 0.011 ↑ 1.0 1 1

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

  • Filter: (id_subestado = 2)
  • Rows Removed by Filter: 2
10. 4.715 26.257 ↑ 1.0 2,521 1

Hash Join (cost=166.37..608.55 rows=2,524 width=189) (actual time=5.835..26.257 rows=2,521 loops=1)

  • Hash Cond: (planificacion.id_estado = estado_planificacion.id_estado)
11. 5.425 21.528 ↑ 1.0 2,521 1

Hash Join (cost=165.28..572.75 rows=2,524 width=193) (actual time=5.797..21.528 rows=2,521 loops=1)

  • Hash Cond: (planificacion.id_especialiadad = especialidades.id_especialidades)
12. 4.745 11.037 ↑ 1.0 2,524 1

Hash Join (cost=102.67..475.42 rows=2,527 width=51) (actual time=0.707..11.037 rows=2,524 loops=1)

  • Hash Cond: (planificacion.id_modalidad = modalidad.id_modalidad)
13. 5.689 6.280 ↑ 1.0 2,534 1

Bitmap Heap Scan on planificacion (cost=101.62..439.58 rows=2,540 width=44) (actual time=0.657..6.280 rows=2,534 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.591 0.591 ↑ 1.0 2,798 1

Bitmap Index Scan on planificacion_id_subestado_idx (cost=0.00..100.98 rows=2,798 width=0) (actual time=0.591..0.591 rows=2,798 loops=1)

  • Index Cond: (id_subestado = 2)
15. 0.005 0.012 ↑ 1.0 2 1

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

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

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

17. 1.922 5.066 ↓ 1.0 885 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 112kB
18. 1.757 3.144 ↓ 1.0 885 1

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

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

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

20. 0.068 0.311 ↑ 1.0 57 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 5kB
21. 0.139 0.243 ↑ 1.0 57 1

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

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

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

23. 0.030 0.055 ↑ 1.0 24 1

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

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

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

25. 0.006 0.014 ↑ 1.0 4 1

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

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

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

27. 1.271 1.369 ↑ 1.0 95 1

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

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

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

29. 4.215 7.674 ↑ 1.0 3,027 1

Hash (cost=89.27..89.27 rows=3,027 width=95) (actual time=7.674..7.674 rows=3,027 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 383kB
30. 3.459 3.459 ↑ 1.0 3,027 1

Seq Scan on ubicacion (cost=0.00..89.27 rows=3,027 width=95) (actual time=0.006..3.459 rows=3,027 loops=1)

31. 2.296 4.299 ↑ 1.1 2,081 1

Hash (cost=36.24..36.24 rows=2,224 width=20) (actual time=4.299..4.299 rows=2,081 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 109kB
32. 2.003 2.003 ↑ 1.1 2,081 1

Seq Scan on barrio (cost=0.00..36.24 rows=2,224 width=20) (actual time=0.008..2.003 rows=2,081 loops=1)

33. 0.380 1.163 ↑ 1.0 254 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
34. 0.510 0.783 ↑ 1.0 254 1

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

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

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

36. 0.024 0.045 ↑ 1.0 18 1

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

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

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

38.          

SubPlan (forHash Left Join)

39. 52.941 259.663 ↑ 1.0 1 2,521

Aggregate (cost=67.19..67.20 rows=1 width=8) (actual time=0.103..0.103 rows=1 loops=2,521)

40. 168.907 206.722 ↑ 1.6 16 2,521

Bitmap Heap Scan on inscripcion_alumno insxx (cost=2.28..67.13 rows=26 width=8) (actual time=0.029..0.082 rows=16 loops=2,521)

  • Recheck Cond: (id_planificacion = planificacion.id_planificacion)
  • Filter: (estado_inscripcion = 1)
  • Rows Removed by Filter: 8
41. 37.815 37.815 ↑ 1.5 24 2,521

Bitmap Index Scan on inscripcion_alumno_id_planificacion_idx (cost=0.00..2.27 rows=36 width=0) (actual time=0.015..0.015 rows=24 loops=2,521)

  • Index Cond: (id_planificacion = planificacion.id_planificacion)