explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZQ8A

Settings
# exclusive inclusive rows x rows loops node
1. 678.335 145,733.624 ↓ 1.3 1,913,787 1

Planning time: 3.637 msHash Join (cost=736,948.05..2,427,943.00 rows=1,446,760 width=56) (actual time=54,282.581..145,733.624 rows=1,913,787 loops=1)

  • Hash Cond: (s.regimen_afiliacion_id = ra.id)
2. 145,055.260 145,055.260 ↓ 1.3 1,913,787 1

Hash Join (cost=736,947.00..2,408,049.00 rows=1,446,760 width=44) (actual time=54,282.530..145,055.260 rows=1,913,787 loops=1)

3. 0.000 0.029 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=16) (actual time=0.029..0.029 rows=2 loops=1)

  • Hash Cond: (v.tipo_valorizacion = tv.id)
  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
4. 0.020 0.020 ↑ 1.0 2 1

Seq Scan on regimen_afiliacion ra (cost=0.00..1.02 rows=2 width=16) (actual time=0.018..0.020 rows=2 loops=1)

5. 144,259.163 144,259.163 ↓ 1.3 1,913,787 1

Nested Loop (cost=736,945.80..2,388,154.85 rows=1,446,760 width=26) (actual time=54,282.497..144,259.163 rows=1,913,787 loops=1)

6. 0.000 0.017 ↑ 1.0 9 1

Hash (cost=1.09..1.09 rows=9 width=22) (actual time=0.017..0.017 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
7. 0.007 0.007 ↑ 1.0 9 1

Seq Scan on tipo_valorizacion tv (cost=0.00..1.09 rows=9 width=22) (actual time=0.005..0.007 rows=9 loops=1)

8. 66,982.545 66,982.545 ↑ 1.0 1 1,913,787

Index Scan using pk_solicitud_pkey on solicitud s (cost=0.43..0.59 rows=1 width=8) (actual time=0.035..0.035 rows=1 loops=1,913,787)

9. 4,045.079 75,530.141 ↓ 1.3 1,913,787 1

Hash Join (cost=736,945.36..1,527,035.58 rows=1,446,760 width=26) (actual time=54,282.428..75,530.141 rows=1,913,787 loops=1)

  • Index Cond: (id = si.solicitud_id)
  • Hash Cond: (si.autorizacion_id = a.id)
10. 18,725.655 18,725.655 ↓ 1.0 1,960,478 1

Hash Join (cost=114,277.39..853,215.95 rows=1,956,483 width=18) (actual time=1,432.929..18,725.655 rows=1,960,478 loops=1)

11. 913.573 52,759.407 ↓ 1.0 13,348,527 1

Hash (cost=455,983.18..455,983.18 rows=13,334,784 width=16) (actual time=52,759.407..52,759.407 rows=13,348,527 loops=1)

  • Hash Cond: (si.id = v.solicitud_item_id)
  • Buckets: 16777216 Batches: 1 Memory Usage: 808927kB
12. 3,562.657 3,562.657 ↓ 1.0 21,401,051 1

Seq Scan on solicitud_item si (cost=0.00..612,417.82 rows=21,391,182 width=12) (actual time=0.010..3,562.657 rows=21,401,051 loops=1)

13. 46,859.057 46,859.057 ↓ 1.0 13,348,527 1

Seq Scan on autorizacion a (cost=0.00..455,983.18 rows=13,334,784 width=16) (actual time=0.062..46,859.057 rows=13,348,527 loops=1)

14. 668.046 1,424.120 ↓ 1.0 1,960,478 1

Hash (cost=89,821.35..89,821.35 rows=1,956,483 width=14) (actual time=1,424.120..1,424.120 rows=1,960,478 loops=1)

  • Rows Removed by Filter: 4684240
  • Filter: (estado_autorizacion_id = 4)
  • Buckets: 2097152 Batches: 1 Memory Usage: 105796kB
15. 756.074 756.074 ↓ 1.0 1,960,478 1

Seq Scan on valorizacion v (cost=0.00..89,821.35 rows=1,956,483 width=14) (actual time=0.021..756.074 rows=1,960,478 loops=1)

  • Rows Removed by Filter: 1963831
  • Filter: (tipo_valorizacion <> 1)
Execution time : 145,910.940 ms