explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Sra

Settings
# exclusive inclusive rows x rows loops node
1. 1.431 1,018.788 ↑ 1.0 1 1

Aggregate (cost=79,009.73..79,009.74 rows=1 width=8) (actual time=1,018.788..1,018.788 rows=1 loops=1)

2. 3.318 1,017.357 ↓ 215.0 5,805 1

Nested Loop Anti Join (cost=9,752.93..79,009.66 rows=27 width=0) (actual time=795.320..1,017.357 rows=5,805 loops=1)

3. 6.438 983.569 ↓ 217.6 6,094 1

Nested Loop (cost=9,752.51..78,995.26 rows=28 width=24) (actual time=795.303..983.569 rows=6,094 loops=1)

4. 44.035 958.849 ↓ 152.3 6,094 1

Nested Loop (cost=9,752.37..78,987.45 rows=40 width=32) (actual time=795.285..958.849 rows=6,094 loops=1)

5. 31.769 333.489 ↓ 7.8 38,755 1

Nested Loop (cost=9,751.81..70,581.33 rows=4,976 width=43) (actual time=75.679..333.489 rows=38,755 loops=1)

6. 27.807 101.920 ↓ 3.2 13,320 1

Bitmap Heap Scan on fin_documento findoc (cost=9,751.25..21,878.03 rows=4,139 width=24) (actual time=75.624..101.920 rows=13,320 loops=1)

  • Recheck Cond: ((cd_filial = 30) AND (id_cr_cp = 'R'::bpchar) AND (cd_empresa = 30))
  • Filter: (id_provisao = 'N'::bpchar)
  • Heap Blocks: exact=4287
7. 1.528 74.113 ↓ 0.0 0 1

BitmapAnd (cost=9,751.25..9,751.25 rows=4,139 width=0) (actual time=74.113..74.113 rows=0 loops=1)

8. 6.535 6.535 ↑ 1.7 13,386 1

Bitmap Index Scan on fin_documento_idx1 (cost=0.00..916.98 rows=22,781 width=0) (actual time=6.535..6.535 rows=13,386 loops=1)

  • Index Cond: ((cd_filial = 30) AND (id_cr_cp = 'R'::bpchar))
9. 66.050 66.050 ↑ 1.0 300,394 1

Bitmap Index Scan on fin_documento_pk (cost=0.00..8,831.96 rows=311,404 width=0) (actual time=66.050..66.050 rows=300,394 loops=1)

  • Index Cond: (cd_empresa = 30)
10. 199.800 199.800 ↓ 1.5 3 13,320

Index Scan using fin_doc_parcela_pk on fin_doc_parcela findocpar (cost=0.56..11.75 rows=2 width=27) (actual time=0.011..0.015 rows=3 loops=13,320)

  • Index Cond: ((cd_empresa = 30) AND (cd_base = findoc.cd_base) AND (seq_processo = findoc.seq_processo))
  • Filter: (id_situacao_eletronica = ANY ('{0,9}'::bpchar[]))
11. 581.325 581.325 ↓ 0.0 0 38,755

Index Scan using fin_doc_parcela_mov_idx3 on fin_doc_parcela_mov findocparmov (cost=0.56..1.68 rows=1 width=51) (actual time=0.015..0.015 rows=0 loops=38,755)

  • Index Cond: ((cd_empresa = 30) AND (cd_base_orig = findocpar.cd_base) AND (seq_processo_orig = findocpar.seq_processo) AND ((parcela_orig)::text = (findocpar.parcela)::text))
  • Filter: ((dt_movimento >= to_date('2018-10-01'::text, 'yyyy-MM-dd'::text)) AND (dt_movimento <= to_date('2019-01-04'::text, 'yyyy-MM-dd'::text)))
  • Rows Removed by Filter: 2
12. 18.282 18.282 ↑ 1.0 1 6,094

Index Scan using operacao_financ_pk on operacao_financ opefin (cost=0.14..0.19 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=6,094)

  • Index Cond: (cd_operacao = findocparmov.cd_operacao)
  • Filter: (((id_tipo_operacao)::text <> 'EP'::text) AND ((id_tipo_operacao)::text = ANY ('{BD,AD,FI,IN,EM,EP,BN,SB,TE,DV,SE,BT,PG,EC,TS,BA}'::text[])))
13. 30.470 30.470 ↓ 0.0 0 6,094

Index Only Scan using processo_canc_pk on processo_canc procan (cost=0.41..0.51 rows=1 width=24) (actual time=0.005..0.005 rows=0 loops=6,094)

  • Index Cond: ((cd_empresa = findocparmov.cd_empresa) AND (cd_empresa = 30) AND (cd_base = findocparmov.cd_base) AND (seq_processo = findocparmov.seq_processo))
  • Heap Fetches: 289