explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6Nsj

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 967.903 ↓ 0.0 0 1

Limit (cost=18,379.95..51,787.89 rows=14,265 width=638) (actual time=967.903..967.903 rows=0 loops=1)

2. 48.903 967.901 ↓ 0.0 0 1

Hash Anti Join (cost=18,379.95..51,787.89 rows=14,265 width=638) (actual time=967.900..967.901 rows=0 loops=1)

  • Hash Cond: ((findocpar.cd_empresa = procan.cd_empresa) AND (findocpar.cd_base = procan.cd_base) AND (findocpar.seq_processo = procan.seq_processo))
3. 18.665 824.070 ↓ 3.9 59,700 1

Nested Loop (cost=12,791.71..45,934.67 rows=15,154 width=638) (actual time=695.620..824.070 rows=59,700 loops=1)

4. 0.046 0.046 ↑ 1.0 1 1

Index Scan using pessoa_empresa_financ_pk on pessoa_empresa_financ pesempfin (cost=0.12..8.14 rows=1 width=16) (actual time=0.038..0.046 rows=1 loops=1)

  • Filter: (id_utiliza_juros_cap = 'S'::bpchar)
5. 115.528 805.359 ↓ 3.9 59,700 1

Bitmap Heap Scan on fin_doc_parcela findocpar (cost=12,791.59..45,774.99 rows=15,154 width=638) (actual time=695.567..805.359 rows=59,700 loops=1)

  • Recheck Cond: ((abs(vl_saldo) > '0'::numeric) AND (COALESCE(dt_ult_atu_hist, '1900-01-01'::date) < to_date('2019-09-24'::text, 'yyyy-MM-dd'::text)) AND (dt_vencimento >= pesempfin.dt_ini_rotina_jur) AND (dt_vencimento <= pesempfin.dt_fim_rotina_jur))
  • Filter: ((id_status_juros IS NULL) AND (id_situacao_eletronica = ANY ('{0,9}'::bpchar[])) AND (pesempfin.cd_empresa = cd_empresa))
  • Rows Removed by Filter: 519
  • Heap Blocks: exact=19,925
6. 2.756 689.831 ↓ 0.0 0 1

BitmapAnd (cost=12,791.59..12,791.59 rows=15,156 width=0) (actual time=689.831..689.831 rows=0 loops=1)

7. 33.830 33.830 ↑ 2.3 60,219 1

Bitmap Index Scan on fin_doc_parcela_idx4 (cost=0.00..2,999.81 rows=136,400 width=0) (actual time=33.830..33.830 rows=60,219 loops=1)

  • Index Cond: ((abs(vl_saldo) > '0'::numeric) AND (COALESCE(dt_ult_atu_hist, '1900-01-01'::date) < to_date('2019-09-24'::text, 'yyyy-MM-dd'::text)))
8. 653.245 653.245 ↓ 10.0 2,669,950 1

Bitmap Index Scan on fin_doc_parcela_idx1 (cost=0.00..9,753.64 rows=267,321 width=0) (actual time=653.245..653.245 rows=2,669,950 loops=1)

  • Index Cond: ((dt_vencimento >= pesempfin.dt_ini_rotina_jur) AND (dt_vencimento <= pesempfin.dt_fim_rotina_jur))
9. 50.892 94.928 ↑ 1.0 138,735 1

Hash (cost=3,156.54..3,156.54 rows=138,954 width=24) (actual time=94.927..94.928 rows=138,735 loops=1)

  • Buckets: 262,144 Batches: 1 Memory Usage: 9,636kB
10. 44.036 44.036 ↑ 1.0 138,735 1

Seq Scan on processo_canc procan (cost=0.00..3,156.54 rows=138,954 width=24) (actual time=0.032..44.036 rows=138,735 loops=1)

Planning time : 2.241 ms
Execution time : 968.153 ms