explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PdiB

Settings
# exclusive inclusive rows x rows loops node
1. 88.495 18,501.082 ↑ 1.0 2,521 1

Hash Left Join (cost=844.46..3,530,947.30 rows=2,524 width=377) (actual time=62.369..18,501.082 rows=2,521 loops=1)

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

Hash Left Join (cost=828.85..1,160.83 rows=2,524 width=334) (actual time=57.522..179.474 rows=2,521 loops=1)

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

Hash Left Join (cost=769.70..1,063.83 rows=2,524 width=320) (actual time=52.926..157.974 rows=2,521 loops=1)

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

Hash Join (cost=643.34..913.26 rows=2,524 width=233) (actual time=42.961..125.702 rows=2,521 loops=1)

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

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

6. 5.420 42.874 ↑ 1.0 2,521 1

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

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

Hash Join (cost=108.75..611.79 rows=2,524 width=201) (actual time=5.276..37.454 rows=2,521 loops=1)

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

Nested Loop (cost=104.61..572.94 rows=2,524 width=185) (actual time=5.051..31.987 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.931 27.692 ↑ 1.0 2,521 1

Hash Join (cost=104.61..546.67 rows=2,524 width=189) (actual time=5.037..27.692 rows=2,521 loops=1)

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

Hash Join (cost=103.52..510.87 rows=2,524 width=193) (actual time=5.011..22.747 rows=2,521 loops=1)

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

Hash Join (cost=40.90..413.54 rows=2,527 width=51) (actual time=0.551..12.612 rows=2,524 loops=1)

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

Bitmap Heap Scan on planificacion (cost=39.86..377.70 rows=2,540 width=44) (actual time=0.532..7.320 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.476 0.476 ↓ 1.0 2,814 1

Bitmap Index Scan on planificacion_id_subestado_idx (cost=0.00..39.22 rows=2,792 width=0) (actual time=0.476..0.476 rows=2,814 loops=1)

  • Index Cond: (id_subestado = 2)
15. 0.003 0.009 ↑ 1.0 2 1

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

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

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

17. 1.339 4.429 ↓ 1.0 885 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 112kB
18. 1.716 3.090 ↓ 1.0 885 1

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

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

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

20. 0.068 0.304 ↑ 1.0 57 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 5kB
21. 0.130 0.236 ↑ 1.0 57 1

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

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

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

23. 0.032 0.056 ↑ 1.0 24 1

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

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

Seq Scan on programas_formacion_familias (cost=0.00..1.24 rows=24 width=29) (actual time=0.004..0.024 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. 0.105 0.212 ↑ 1.0 95 1

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

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

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

29. 4.419 9.929 ↓ 1.0 3,005 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 380kB
30. 5.510 5.510 ↓ 1.0 3,005 1

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

31. 2.451 4.559 ↓ 1.0 2,060 1

Hash (cost=33.51..33.51 rows=2,051 width=20) (actual time=4.559..4.559 rows=2,060 loops=1)

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

Seq Scan on barrio (cost=0.00..33.51 rows=2,051 width=20) (actual time=0.007..2.108 rows=2,060 loops=1)

33. 0.314 1.241 ↑ 1.0 254 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 21kB
34. 0.551 0.927 ↑ 1.0 254 1

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

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

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

36. 0.026 0.109 ↑ 1.0 18 1

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

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

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

38.          

SubPlan (for Hash Left Join)

39. 146.218 18,231.872 ↑ 1.0 1 2,521

Aggregate (cost=1,398.44..1,398.45 rows=1 width=8) (actual time=7.231..7.232 rows=1 loops=2,521)

40. 18,085.654 18,085.654 ↑ 1.6 16 2,521

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.840..7.174 rows=16 loops=2,521)

  • Index Cond: (id_planificacion = planificacion.id_planificacion)
  • Filter: (estado_inscripcion = 1)
  • Rows Removed by Filter: 8
Total runtime : 18,522.301 ms