explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oIRK

Settings
# exclusive inclusive rows x rows loops node
1. 0.013 734.960 ↑ 1.0 1 1

Finalize Aggregate (cost=87,831.54..87,831.55 rows=1 width=8) (actual time=734.959..734.960 rows=1 loops=1)

2. 12.612 734.947 ↓ 1.5 3 1

Gather (cost=87,831.32..87,831.53 rows=2 width=8) (actual time=734.931..734.947 rows=3 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.564 722.335 ↑ 1.0 1 3

Partial Aggregate (cost=86,831.32..86,831.33 rows=1 width=8) (actual time=722.334..722.335 rows=1 loops=3)

4. 15.826 721.771 ↓ 56.9 1,935 3

Nested Loop Anti Join (cost=1.67..86,831.24 rows=34 width=0) (actual time=592.039..721.771 rows=1,935 loops=3)

5. 11.301 705.938 ↓ 58.0 2,031 3

Nested Loop (cost=1.26..86,813.37 rows=35 width=24) (actual time=591.889..705.938 rows=2,031 loops=3)

6. 309.570 694.632 ↓ 39.8 2,031 3

Nested Loop (cost=1.11..86,803.41 rows=51 width=32) (actual time=591.832..694.632 rows=2,031 loops=3)

7. 123.205 385.040 ↓ 2.1 12,918 3

Nested Loop (cost=0.56..76,568.41 rows=6,044 width=43) (actual time=3.720..385.040 rows=12,918 loops=3)

8. 261.810 261.810 ↓ 2.3 4,440 3

Parallel Seq Scan on fin_documento findoc (cost=0.00..53,631.17 rows=1,965 width=24) (actual time=3.542..261.810 rows=4,440 loops=3)

  • Filter: ((cd_empresa = 30) AND (cd_filial = 30) AND (id_cr_cp = 'R'::bpchar) AND (id_provisao = 'N'::bpchar))
  • Rows Removed by Filter: 528176
9. 0.025 0.025 ↓ 1.5 3 13,320

Index Scan using fin_doc_parcela_pk on fin_doc_parcela findocpar (cost=0.56..11.65 rows=2 width=27) (actual time=0.018..0.025 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[]))
10. 0.022 0.022 ↓ 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.022..0.022 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
11. 0.005 0.005 ↑ 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.004..0.005 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[])))
12. 0.007 0.007 ↓ 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.007..0.007 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: 130