explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LDDs : Optimization for: plan #OJzF

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 300.147 3,193.334 ↓ 1.0 126,402 1

Hash Left Join (cost=19,454.50..32,162.95 rows=126,262 width=163) (actual time=1,552.202..3,193.334 rows=126,402 loops=1)

  • Hash Cond: (inscripcion_alumno.estado_inscripcion = estado_inscripcion.id)
2. 359.506 2,893.167 ↓ 1.0 126,402 1

Hash Left Join (cost=19,453.41..30,110.10 rows=126,262 width=152) (actual time=1,552.149..2,893.167 rows=126,402 loops=1)

  • Hash Cond: (inscripcion_alumno.id_planificacion = planificacion.id_planificacion)
3. 424.571 2,484.916 ↓ 1.0 126,402 1

Hash Join (cost=18,876.47..26,376.61 rows=126,262 width=109) (actual time=1,503.363..2,484.916 rows=126,402 loops=1)

  • Hash Cond: (alumno.id_usuario = usuario.id)
4. 421.482 797.962 ↓ 1.0 126,402 1

Hash Join (cost=3,399.81..8,374.70 rows=126,263 width=40) (actual time=240.779..797.962 rows=126,402 loops=1)

  • Hash Cond: (inscripcion_alumno.id_alumno = alumno.id_alumno)
5. 136.012 136.012 ↓ 1.0 126,402 1

Seq Scan on inscripcion_alumno (cost=0.00..2,449.63 rows=126,263 width=36) (actual time=0.008..136.012 rows=126,402 loops=1)

6. 125.374 240.468 ↑ 1.0 96,917 1

Hash (cost=2,188.25..2,188.25 rows=96,925 width=12) (actual time=240.468..240.468 rows=96,917 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 4165kB
7. 115.094 115.094 ↑ 1.0 96,917 1

Seq Scan on alumno (cost=0.00..2,188.25 rows=96,925 width=12) (actual time=0.010..115.094 rows=96,917 loops=1)

8. 133.400 1,262.383 ↓ 1.0 96,918 1

Hash (cost=14,265.30..14,265.30 rows=96,909 width=77) (actual time=1,262.383..1,262.383 rows=96,918 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 10201kB
9. 250.048 1,128.983 ↓ 1.0 96,918 1

Hash Join (cost=7,180.82..14,265.30 rows=96,909 width=77) (actual time=528.463..1,128.983 rows=96,918 loops=1)

  • Hash Cond: (usuario.id_person = persons.id)
10. 241.749 585.786 ↓ 1.0 96,918 1

Hash Join (cost=3,317.76..8,464.05 rows=96,909 width=48) (actual time=235.119..585.786 rows=96,918 loops=1)

  • Hash Cond: (usuario.id_person = persons_docs.person_id)
11. 109.117 109.117 ↓ 1.0 96,918 1

Seq Scan on usuario (cost=0.00..3,208.10 rows=96,910 width=33) (actual time=0.007..109.117 rows=96,918 loops=1)

12. 117.250 234.920 ↓ 1.0 99,344 1

Hash (cost=2,077.39..2,077.39 rows=99,230 width=15) (actual time=234.920..234.920 rows=99,344 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 4664kB
13. 117.670 117.670 ↓ 1.0 99,344 1

Seq Scan on persons_docs (cost=0.00..2,077.39 rows=99,230 width=15) (actual time=0.014..117.670 rows=99,344 loops=1)

  • Filter: ((valor)::text <> ''::text)
14. 152.189 293.149 ↑ 1.0 99,344 1

Hash (cost=2,620.25..2,620.25 rows=99,425 width=45) (actual time=293.149..293.149 rows=99,344 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 7429kB
15. 140.960 140.960 ↑ 1.0 99,344 1

Seq Scan on persons (cost=0.00..2,620.25 rows=99,425 width=45) (actual time=0.010..140.960 rows=99,344 loops=1)

16. 11.664 48.745 ↓ 1.0 9,955 1

Hash (cost=452.54..452.54 rows=9,952 width=47) (actual time=48.745..48.745 rows=9,955 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 716kB
17. 19.046 37.081 ↓ 1.0 9,955 1

Hash Left Join (cost=64.53..452.54 rows=9,952 width=47) (actual time=1.893..37.081 rows=9,955 loops=1)

  • Hash Cond: (planificacion.id_especialiadad = especialidades.id_especialidades)
18. 16.200 16.200 ↓ 1.0 9,955 1

Index Only Scan using planificacion_id_planificacion_id_estado_id_especialiadad_i_idx on planificacion (cost=0.29..251.56 rows=9,952 width=12) (actual time=0.035..16.200 rows=9,955 loops=1)

  • Heap Fetches: 7984
19. 0.945 1.835 ↓ 1.0 910 1

Hash (cost=53.00..53.00 rows=900 width=43) (actual time=1.835..1.835 rows=910 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 71kB
20. 0.890 0.890 ↓ 1.0 910 1

Seq Scan on especialidades (cost=0.00..53.00 rows=900 width=43) (actual time=0.007..0.890 rows=910 loops=1)

21. 0.008 0.020 ↑ 1.0 4 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
22. 0.012 0.012 ↑ 1.0 4 1

Seq Scan on estado_inscripcion (cost=0.00..1.04 rows=4 width=15) (actual time=0.006..0.012 rows=4 loops=1)