explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2sCf

Settings
# exclusive inclusive rows x rows loops node
1. 961.001 13,027.542 ↓ 11.5 352,888 1

Hash Left Join (cost=13,585.79..30,696.17 rows=30,646 width=4,442) (actual time=5,316.814..13,027.542 rows=352,888 loops=1)

  • Hash Cond: (nits.cod_actividad_economica = actividad_itau.cod_actividad_economica)
2. 681.513 12,010.880 ↓ 29.0 352,888 1

Hash Left Join (cost=13,565.45..28,812.76 rows=12,161 width=3,982) (actual time=5,261.013..12,010.880 rows=352,888 loops=1)

  • Hash Cond: ((nits.cod_segmento_gest)::text = textin(int2out(subsegmento_itau.cls_segmento)))
3. 209.483 11,329.322 ↓ 29.0 352,888 1

Hash Left Join (cost=13,563.55..28,695.33 rows=12,161 width=3,942) (actual time=5,260.925..11,329.322 rows=352,888 loops=1)

  • Hash Cond: (docdeu.codcob_ultimo = estcob.codcob)
4. 225.329 11,119.706 ↓ 29.0 352,888 1

Hash Left Join (cost=13,547.26..28,646.70 rows=12,161 width=3,914) (actual time=5,260.761..11,119.706 rows=352,888 loops=1)

  • Hash Cond: (nits.tipo_iden = tipo_documento_itau.tip_doc_id)
5. 313.847 10,894.338 ↓ 29.0 352,888 1

Hash Left Join (cost=13,545.45..28,612.28 rows=12,161 width=3,750) (actual time=5,260.667..10,894.338 rows=352,888 loops=1)

  • Hash Cond: ((docdeu.tipdoc)::text = (tipdoc.tipdoc)::text)
6. 644.082 10,580.343 ↓ 29.0 352,888 1

Nested Loop (cost=13,537.96..28,464.94 rows=12,161 width=3,724) (actual time=5,260.378..10,580.343 rows=352,888 loops=1)

7. 1,200.518 6,375.861 ↓ 29.3 356,040 1

Hash Right Join (cost=13,537.54..13,720.00 rows=12,161 width=3,508) (actual time=5,173.994..6,375.861 rows=356,040 loops=1)

  • Hash Cond: (sn.consdocdeu = docdeu.consdocdeu)
  • Filter: ((sn.conspolitica IS NULL) OR ((sn.estado_neg)::text = ANY ('{C,RC}'::text[])) OR (docdeu.meses_transcurridos_neg IS NOT NULL))
  • Rows Removed by Filter: 916
8. 0.619 1.764 ↑ 2.3 1,257 1

Hash Left Join (cost=3.36..178.37 rows=2,840 width=250) (actual time=0.127..1.764 rows=1,257 loops=1)

  • Hash Cond: (sn.conspolitica = cp.consecutivo)
9. 1.098 1.098 ↑ 2.3 1,257 1

Seq Scan on segui_negociaciones sn (cost=0.00..167.40 rows=2,840 width=32) (actual time=0.034..1.098 rows=1,257 loops=1)

10. 0.011 0.047 ↓ 1.2 20 1

Hash (cost=3.16..3.16 rows=16 width=222) (actual time=0.047..0.047 rows=20 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
11. 0.036 0.036 ↓ 1.2 20 1

Seq Scan on condonacion_politica cp (cost=0.00..3.16 rows=16 width=222) (actual time=0.018..0.036 rows=20 loops=1)

12. 1,254.800 5,173.579 ↓ 29.2 356,710 1

Hash (cost=13,381.42..13,381.42 rows=12,221 width=3,290) (actual time=5,173.579..5,173.579 rows=356,710 loops=1)

  • Buckets: 131072 (originally 16384) Batches: 4 (originally 1) Memory Usage: 101377kB
13. 3,719.509 3,918.779 ↓ 29.2 356,710 1

Bitmap Heap Scan on docdeu (cost=140.24..13,381.42 rows=12,221 width=3,290) (actual time=296.282..3,918.779 rows=356,710 loops=1)

  • Recheck Cond: (estado = 'A'::bpchar)
  • Heap Blocks: exact=273858
14. 199.270 199.270 ↓ 57.5 702,112 1

Bitmap Index Scan on i_docdeu_estado_codcob (cost=0.00..137.19 rows=12,221 width=0) (actual time=199.270..199.270 rows=702,112 loops=1)

  • Index Cond: (estado = 'A'::bpchar)
15. 3,560.400 3,560.400 ↑ 1.0 1 356,040

Index Scan using nits_nit on nits (cost=0.42..1.21 rows=1 width=224) (actual time=0.010..0.010 rows=1 loops=356,040)

  • Index Cond: (nit = docdeu.nit)
16. 0.053 0.148 ↑ 1.0 155 1

Hash (cost=5.55..5.55 rows=155 width=102) (actual time=0.148..0.148 rows=155 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
17. 0.095 0.095 ↑ 1.0 155 1

Seq Scan on tipdoc (cost=0.00..5.55 rows=155 width=102) (actual time=0.028..0.095 rows=155 loops=1)

18. 0.014 0.039 ↑ 1.0 36 1

Hash (cost=1.36..1.36 rows=36 width=184) (actual time=0.039..0.039 rows=36 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
19. 0.025 0.025 ↑ 1.0 36 1

Seq Scan on tipo_documento_itau (cost=0.00..1.36 rows=36 width=184) (actual time=0.018..0.025 rows=36 loops=1)

20. 0.041 0.133 ↑ 2.3 139 1

Hash (cost=12.24..12.24 rows=324 width=36) (actual time=0.133..0.133 rows=139 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 17kB
21. 0.092 0.092 ↑ 2.3 141 1

Seq Scan on estcob (cost=0.00..12.24 rows=324 width=36) (actual time=0.017..0.092 rows=141 loops=1)

22. 0.020 0.045 ↑ 1.0 40 1

Hash (cost=1.40..1.40 rows=40 width=166) (actual time=0.045..0.045 rows=40 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
23. 0.025 0.025 ↑ 1.0 40 1

Seq Scan on subsegmento_itau (cost=0.00..1.40 rows=40 width=166) (actual time=0.018..0.025 rows=40 loops=1)

24. 0.143 55.661 ↑ 1.0 504 1

Hash (cost=14.04..14.04 rows=504 width=248) (actual time=55.661..55.661 rows=504 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 58kB
25. 55.518 55.518 ↑ 1.0 504 1

Seq Scan on actividad_itau (cost=0.00..14.04 rows=504 width=248) (actual time=55.069..55.518 rows=504 loops=1)