explain.depesz.com

PostgreSQL's explain analyze made readable

Result: l21Q

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

HashAggregate (cost=3,050.01..5,173.58 rows=1 width=133) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.99..3,049.98 rows=1 width=133) (actual rows= loops=)

  • Join Filter: (instructor.id_situacion = situacion_instructores.id_situacion_instructores)
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.99..3,048.84 rows=1 width=134) (actual rows= loops=)

  • Join Filter: (x.id_unidad_operativa = unidad_operativa.id_unidad_operativa)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.99..3,044.71 rows=1 width=114) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.71..3,044.40 rows=1 width=83) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.42..3,044.05 rows=1 width=92) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..3,042.37 rows=1 width=56) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..2,967.76 rows=1 width=40) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..2,967.33 rows=1 width=24) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..2,904.25 rows=2 width=16) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Seq Scan on agenda_uno (cost=0.00..2,895.62 rows=2 width=4) (actual rows= loops=)

  • Filter: ((date_part('month'::text, (fecha)::timestamp without time zone) = 5::double precision) AND (date_part('year'::text, (fecha)::timestamp without time zone) = 2019::double precision))
12. 0.000 0.000 ↓ 0.0

Index Scan using planificacion_id_planificacion_id_ubicacion_id_especialiada_idx on planificacion x (cost=0.29..4.31 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (id_planificacion = agenda_uno.id_planificacion)
13. 0.000 0.000 ↓ 0.0

Index Only Scan using instructor_asignado_id_instructor_id_planificacion_idx on instructor_asignado (cost=0.28..31.53 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id_planificacion = x.id_planificacion)
14. 0.000 0.000 ↓ 0.0

Index Scan using instructor_pkey on instructor (cost=0.28..0.42 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id_instructor = instructor_asignado.id_instructor)
15. 0.000 0.000 ↓ 0.0

Index Scan using periodo_id_periodo_id_planificacion_idx on periodo (cost=0.29..74.60 rows=1 width=28) (actual rows= loops=)

  • Index Cond: (id_planificacion = x.id_planificacion)
16. 0.000 0.000 ↓ 0.0

Index Scan using persons_pkey on persons (cost=0.29..1.67 rows=1 width=36) (actual rows= loops=)

  • Index Cond: (id = instructor.id_persons)
17. 0.000 0.000 ↓ 0.0

Index Scan using persons_docs_person_id_key on persons_docs (cost=0.29..0.33 rows=1 width=15) (actual rows= loops=)

  • Index Cond: (person_id = persons.id)
18. 0.000 0.000 ↓ 0.0

Index Scan using especialidades_pkey on especialidades (cost=0.28..0.30 rows=1 width=43) (actual rows= loops=)

  • Index Cond: (id_especialidades = x.id_especialiadad)
19. 0.000 0.000 ↓ 0.0

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

20. 0.000 0.000 ↓ 0.0

Seq Scan on situacion_instructores (cost=0.00..1.06 rows=6 width=11) (actual rows= loops=)

21.          

SubPlan (forHashAggregate)

22. 0.000 0.000 ↓ 0.0

Aggregate (cost=676.43..676.44 rows=1 width=7) (actual rows= loops=)

23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.29..676.41 rows=5 width=7) (actual rows= loops=)

  • Join Filter: (z.id_dia = y.id_dia)
24. 0.000 0.000 ↓ 0.0

Seq Scan on dia y (cost=0.00..1.07 rows=7 width=11) (actual rows= loops=)

25. 0.000 0.000 ↓ 0.0

Materialize (cost=0.29..674.83 rows=5 width=4) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Index Only Scan using horario_id_horario_id_dia_id_planificacion_idx on horario z (cost=0.29..674.80 rows=5 width=4) (actual rows= loops=)

  • Index Cond: (id_planificacion = x.id_planificacion)
27. 0.000 0.000 ↓ 0.0

Aggregate (cost=1,447.11..1,447.12 rows=1 width=16) (actual rows= loops=)

28. 0.000 0.000 ↓ 0.0

Index Scan using agenda_uno_fecha_id_planificacion_key on agenda_uno agenda_uno_1 (cost=0.29..1,447.10 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (id_planificacion = x.id_planificacion)
  • Filter: (date_part('month'::text, (fecha)::timestamp without time zone) = 5::double precision)