explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kcxt

Settings
# exclusive inclusive rows x rows loops node
1. 940.812 11,200.949 ↓ 11.5 352,888 1

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

  • Hash Cond: (nits.cod_actividad_economica = actividad_itau.cod_actividad_economica)
2. 672.796 10,259.855 ↓ 29.0 352,888 1

Hash Left Join (cost=13,565.45..28,812.76 rows=12,161 width=3,982) (actual time=4,229.056..10,259.855 rows=352,888 loops=1)

  • Hash Cond: ((nits.cod_segmento_gest)::text = textin(int2out(subsegmento_itau.cls_segmento)))
3. 223.719 9,587.026 ↓ 29.0 352,888 1

Hash Left Join (cost=13,563.55..28,695.33 rows=12,161 width=3,942) (actual time=4,228.980..9,587.026 rows=352,888 loops=1)

  • Hash Cond: (docdeu.codcob_ultimo = estcob.codcob)
4. 221.204 9,363.209 ↓ 29.0 352,888 1

Hash Left Join (cost=13,547.26..28,646.70 rows=12,161 width=3,914) (actual time=4,228.858..9,363.209 rows=352,888 loops=1)

  • Hash Cond: (nits.tipo_iden = tipo_documento_itau.tip_doc_id)
5. 307.972 9,141.977 ↓ 29.0 352,888 1

Hash Left Join (cost=13,545.45..28,612.28 rows=12,161 width=3,750) (actual time=4,228.799..9,141.977 rows=352,888 loops=1)

  • Hash Cond: ((docdeu.tipdoc)::text = (tipdoc.tipdoc)::text)
6. 762.125 8,833.891 ↓ 29.0 352,888 1

Nested Loop (cost=13,537.96..28,464.94 rows=12,161 width=3,724) (actual time=4,228.653..8,833.891 rows=352,888 loops=1)

7. 2,417.613 6,647.606 ↓ 29.3 356,040 1

Hash Right Join (cost=13,537.54..13,720.00 rows=12,161 width=3,508) (actual time=4,228.587..6,647.606 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.556 1.694 ↑ 2.3 1,257 1

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

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

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

10. 0.008 0.036 ↓ 1.2 20 1

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

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

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

12. 1,095.671 4,228.299 ↓ 29.2 356,710 1

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

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

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

  • Recheck Cond: (estado = 'A'::bpchar)
  • Heap Blocks: exact=273858
14. 152.141 152.141 ↓ 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=152.141..152.141 rows=702,112 loops=1)

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

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

  • Index Cond: (nit = docdeu.nit)
16. 0.043 0.114 ↑ 1.0 155 1

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

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

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

18. 0.012 0.028 ↑ 1.0 36 1

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

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

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

20. 0.038 0.098 ↑ 2.3 139 1

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

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

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

22. 0.018 0.033 ↑ 1.0 40 1

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

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

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

24. 0.097 0.282 ↑ 1.0 504 1

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

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

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