explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lZxE

Settings
# exclusive inclusive rows x rows loops node
1. 56.330 3,449.452 ↓ 165.5 5,794 1

Nested Loop Left Join (cost=207.13..682.37 rows=35 width=551) (actual time=8.239..3,449.452 rows=5,794 loops=1)

2. 4.197 3,323.594 ↓ 165.5 5,794 1

Nested Loop Anti Join (cost=206.98..547.30 rows=35 width=406) (actual time=8.119..3,323.594 rows=5,794 loops=1)

3. 3.145 3,282.899 ↓ 169.0 6,083 1

Nested Loop (cost=206.57..243.45 rows=36 width=406) (actual time=8.094..3,282.899 rows=6,083 loops=1)

4. 0.017 0.210 ↑ 7.0 1 1

HashAggregate (cost=86.84..86.91 rows=7 width=490) (actual time=0.210..0.210 rows=1 loops=1)

  • Group Key: pesfil.cd_empresa, pesfil.cd_filial, pesfil.id_atividade, pesfil.cd_pessoa, pesfil.cd_segmento_fiscal, pesfil.cd_lista_preco_basica, pesfil.cd_pessoa_clas_fiscal, pesfil.id_perfil_sped_fiscal, pesfil.id_periodo_inventario, pesfil.mes_inventario_anual, pesfil.versao_leiaute_nfe, pesfil.id_formato_danfe, pesfil.id_ambiente_nfe, pesfil.cd_operacao_venda, pesfil.id_volume_trans, pesfil.id_utiliza_lacre_transp, pesfil.cd_tipo_cobranca, pesfil.cd_banco_portador, pesfil.nr_agencia_portador, pesfil.nr_conta_portador, pesfil.id_clas_cons_en_eletr, pesfil.id_tipo_ligacao_default, pesfil.id_grupo_tensao_default, pesfil.id_clas_cons_gas, pesfil.id_tipo_assinante_comunic, pesfil.id_clas_cons_agua, pesfil.cd_lista_preco_tipo_basico, pesfil.cd_lista_preco_prom, pesfil.cd_lista_preco_tipo_prom, pesfil.cd_grupo_unidade_medida, pesfil.id_ecf, pesfil.id_tipo_atualizacao_est, pesfil.id_atualizando_est, pesfil.dt_ult_fec_estoque, pesfil.mes_invent_sped_anual, pesfil.id_emite_nf_conjugada, pesfil.id_origem_tipo_preco, pesfil.cd_operacao_serv, pesfil.id_obriga_cd_barras_nfe, pesfil.id_ativo, pesfil.abrev_filial, pesfil.id_geracao_nfe, pesfil.id_matriz, pesfil.cd_perfil_filial, pesfil.id_venda_saldo_terc
5. 0.001 0.193 ↑ 7.0 1 1

Append (cost=28.29..86.05 rows=7 width=490) (actual time=0.176..0.193 rows=1 loops=1)

6. 0.002 0.043 ↓ 0.0 0 1

Nested Loop (cost=28.29..47.15 rows=3 width=212) (actual time=0.043..0.043 rows=0 loops=1)

7. 0.000 0.041 ↓ 0.0 0 1

Nested Loop (cost=0.55..19.32 rows=1 width=212) (actual time=0.041..0.041 rows=0 loops=1)

8. 0.002 0.041 ↓ 0.0 0 1

Nested Loop (cost=0.55..16.60 rows=1 width=16) (actual time=0.041..0.041 rows=0 loops=1)

9. 0.039 0.039 ↓ 0.0 0 1

Index Scan using operador_uk1 on operador ope_1 (cost=0.28..8.29 rows=1 width=9) (actual time=0.039..0.039 rows=0 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_filial_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
10. 0.000 0.000 ↓ 0.0 0

Index Only Scan using operador_pessoa_filial_pk on operador_pessoa_filial opepesfil (cost=0.28..8.30 rows=1 width=24) (never executed)

  • Index Cond: ((cd_operador = (ope_1.cd_operador)::text) AND (cd_empresa = 30) AND (cd_filial = 30))
  • Heap Fetches: 0
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on pessoa_filial pesfil (cost=0.00..2.71 rows=1 width=212) (never executed)

  • Filter: ((cd_empresa = 30) AND (cd_filial = 30))
12. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=27.74..27.77 rows=3 width=112) (never executed)

  • Group Key: pesemp.cd_empresa, pesemp.cd_pessoa, pesemp.cd_regime_fiscal, pesemp.dt_baixa, pesemp.dt_arq_atos_const, pesemp.dt_arq_conv_simp_empr, pesemp.coef_acresc_venda_ncoop, pesemp.id_cooperativa, pesemp.id_origem_tribut, pesemp.id_controla_fci, pesemp.nr_max_itens_nfe, pesemp.id_valida_cest_fat, pesemp.id_consiste_ncm_xml, pesemp.nr_dias_rev_cad_cli_ven
13. 0.000 0.000 ↓ 0.0 0

Append (cost=0.55..27.64 rows=3 width=112) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.55..17.96 rows=1 width=56) (never executed)

15. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.55..16.60 rows=1 width=8) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Index Scan using operador_uk1 on operador ope_2 (cost=0.28..8.29 rows=1 width=9) (never executed)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'N'::bpchar)
17. 0.000 0.000 ↓ 0.0 0

Index Only Scan using operador_pessoa_empresa_pk on operador_pessoa_empresa opepesemp (cost=0.28..8.29 rows=1 width=16) (never executed)

  • Index Cond: ((cd_operador = (ope_2.cd_operador)::text) AND (cd_empresa = 30))
  • Heap Fetches: 0
18. 0.000 0.000 ↓ 0.0 0

Seq Scan on pessoa_empresa pesemp (cost=0.00..1.35 rows=1 width=56) (never executed)

  • Filter: (cd_empresa = 30)
19. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.28..9.65 rows=1 width=56) (never executed)

20. 0.000 0.000 ↓ 0.0 0

Index Scan using operador_uk1 on operador ope_3 (cost=0.28..8.29 rows=1 width=0) (never executed)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'S'::bpchar)
21. 0.000 0.000 ↓ 0.0 0

Seq Scan on pessoa_empresa pesemp_1 (cost=0.00..1.35 rows=1 width=56) (never executed)

  • Filter: (cd_empresa = 30)
22. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.00 rows=0 width=112) (never executed)

  • One-Time Filter: false
23. 0.004 0.148 ↑ 3.0 1 1

Nested Loop (cost=28.02..38.84 rows=3 width=212) (actual time=0.132..0.148 rows=1 loops=1)

24. 0.005 0.065 ↑ 1.0 1 1

Nested Loop (cost=0.28..11.01 rows=1 width=212) (actual time=0.051..0.065 rows=1 loops=1)

25. 0.017 0.017 ↑ 1.0 1 1

Index Scan using operador_uk1 on operador ope_4 (cost=0.28..8.29 rows=1 width=0) (actual time=0.016..0.017 rows=1 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_filial_todos = 'S'::bpchar)
26. 0.043 0.043 ↑ 1.0 1 1

Seq Scan on pessoa_filial pesfil_1 (cost=0.00..2.71 rows=1 width=212) (actual time=0.031..0.043 rows=1 loops=1)

  • Filter: ((cd_empresa = 30) AND (cd_filial = 30))
  • Rows Removed by Filter: 46
27. 0.015 0.079 ↑ 3.0 1 1

HashAggregate (cost=27.74..27.77 rows=3 width=112) (actual time=0.078..0.079 rows=1 loops=1)

  • Group Key: pesemp_2.cd_empresa, pesemp_2.cd_pessoa, pesemp_2.cd_regime_fiscal, pesemp_2.dt_baixa, pesemp_2.dt_arq_atos_const, pesemp_2.dt_arq_conv_simp_empr, pesemp_2.coef_acresc_venda_ncoop, pesemp_2.id_cooperativa, pesemp_2.id_origem_tribut, pesemp_2.id_controla_fci, pesemp_2.nr_max_itens_nfe, pesemp_2.id_valida_cest_fat, pesemp_2.id_consiste_ncm_xml, pesemp_2.nr_dias_rev_cad_cli_ven
28. 0.002 0.064 ↑ 3.0 1 1

Append (cost=0.55..27.64 rows=3 width=112) (actual time=0.054..0.064 rows=1 loops=1)

29. 0.001 0.019 ↓ 0.0 0 1

Nested Loop (cost=0.55..17.96 rows=1 width=56) (actual time=0.019..0.019 rows=0 loops=1)

30. 0.001 0.018 ↓ 0.0 0 1

Nested Loop (cost=0.55..16.60 rows=1 width=8) (actual time=0.018..0.018 rows=0 loops=1)

31. 0.017 0.017 ↓ 0.0 0 1

Index Scan using operador_uk1 on operador ope_5 (cost=0.28..8.29 rows=1 width=9) (actual time=0.017..0.017 rows=0 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
32. 0.000 0.000 ↓ 0.0 0

Index Only Scan using operador_pessoa_empresa_pk on operador_pessoa_empresa opepesemp_1 (cost=0.28..8.29 rows=1 width=16) (never executed)

  • Index Cond: ((cd_operador = (ope_5.cd_operador)::text) AND (cd_empresa = 30))
  • Heap Fetches: 0
33. 0.000 0.000 ↓ 0.0 0

Seq Scan on pessoa_empresa pesemp_2 (cost=0.00..1.35 rows=1 width=56) (never executed)

  • Filter: (cd_empresa = 30)
34. 0.002 0.043 ↑ 1.0 1 1

Nested Loop (cost=0.28..9.65 rows=1 width=56) (actual time=0.035..0.043 rows=1 loops=1)

35. 0.016 0.016 ↑ 1.0 1 1

Index Scan using operador_uk1 on operador ope_6 (cost=0.28..8.29 rows=1 width=0) (actual time=0.015..0.016 rows=1 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'S'::bpchar)
36. 0.025 0.025 ↑ 1.0 1 1

Seq Scan on pessoa_empresa pesemp_3 (cost=0.00..1.35 rows=1 width=56) (actual time=0.019..0.025 rows=1 loops=1)

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 27
37. 0.000 0.000 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=112) (actual time=0.000..0.000 rows=0 loops=1)

  • One-Time Filter: false
38. 0.001 0.001 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=490) (actual time=0.001..0.001 rows=0 loops=1)

  • One-Time Filter: false
39. 12.016 3,279.544 ↓ 1,216.6 6,083 1

Materialize (cost=119.73..156.05 rows=5 width=376) (actual time=7.882..3,279.544 rows=6,083 loops=1)

40. 3.077 3,267.528 ↓ 1,216.6 6,083 1

Nested Loop (cost=119.73..156.03 rows=5 width=376) (actual time=7.876..3,267.528 rows=6,083 loops=1)

41. 0.009 0.067 ↑ 3.0 1 1

HashAggregate (cost=27.74..27.77 rows=3 width=112) (actual time=0.066..0.067 rows=1 loops=1)

  • Group Key: pesemp_4.cd_empresa, pesemp_4.cd_pessoa, pesemp_4.cd_regime_fiscal, pesemp_4.dt_baixa, pesemp_4.dt_arq_atos_const, pesemp_4.dt_arq_conv_simp_empr, pesemp_4.coef_acresc_venda_ncoop, pesemp_4.id_cooperativa, pesemp_4.id_origem_tribut, pesemp_4.id_controla_fci, pesemp_4.nr_max_itens_nfe, pesemp_4.id_valida_cest_fat, pesemp_4.id_consiste_ncm_xml, pesemp_4.nr_dias_rev_cad_cli_ven
42. 0.002 0.058 ↑ 3.0 1 1

Append (cost=0.55..27.64 rows=3 width=112) (actual time=0.050..0.058 rows=1 loops=1)

43. 0.001 0.018 ↓ 0.0 0 1

Nested Loop (cost=0.55..17.96 rows=1 width=56) (actual time=0.018..0.018 rows=0 loops=1)

44. 0.000 0.017 ↓ 0.0 0 1

Nested Loop (cost=0.55..16.60 rows=1 width=8) (actual time=0.017..0.017 rows=0 loops=1)

45. 0.017 0.017 ↓ 0.0 0 1

Index Scan using operador_uk1 on operador ope_7 (cost=0.28..8.29 rows=1 width=9) (actual time=0.017..0.017 rows=0 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
46. 0.000 0.000 ↓ 0.0 0

Index Only Scan using operador_pessoa_empresa_pk on operador_pessoa_empresa opepesemp_2 (cost=0.28..8.29 rows=1 width=16) (never executed)

  • Index Cond: ((cd_operador = (ope_7.cd_operador)::text) AND (cd_empresa = 30))
  • Heap Fetches: 0
47. 0.000 0.000 ↓ 0.0 0

Seq Scan on pessoa_empresa pesemp_4 (cost=0.00..1.35 rows=1 width=56) (never executed)

  • Filter: (cd_empresa = 30)
48. 0.000 0.037 ↑ 1.0 1 1

Nested Loop (cost=0.28..9.65 rows=1 width=56) (actual time=0.030..0.037 rows=1 loops=1)

49. 0.016 0.016 ↑ 1.0 1 1

Index Scan using operador_uk1 on operador ope_8 (cost=0.28..8.29 rows=1 width=0) (actual time=0.015..0.016 rows=1 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'S'::bpchar)
50. 0.021 0.021 ↑ 1.0 1 1

Seq Scan on pessoa_empresa pesemp_5 (cost=0.00..1.35 rows=1 width=56) (actual time=0.015..0.021 rows=1 loops=1)

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 27
51. 0.001 0.001 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=112) (actual time=0.001..0.001 rows=0 loops=1)

  • One-Time Filter: false
52. 12.685 3,264.384 ↓ 3,041.5 6,083 1

Materialize (cost=91.99..128.16 rows=2 width=368) (actual time=7.809..3,264.384 rows=6,083 loops=1)

53. 6.160 3,251.699 ↓ 3,041.5 6,083 1

Nested Loop (cost=91.99..128.15 rows=2 width=368) (actual time=7.804..3,251.699 rows=6,083 loops=1)

54. 20.910 3,190.792 ↓ 6,083.0 6,083 1

Nested Loop (cost=91.43..126.90 rows=1 width=400) (actual time=7.776..3,190.792 rows=6,083 loops=1)

  • Join Filter: (findocparmov.cd_filial_mov = pesfil_2.cd_filial)
  • Rows Removed by Join Filter: 60830
55. 23.374 3,109.052 ↓ 6,083.0 6,083 1

Nested Loop (cost=3.53..37.89 rows=1 width=362) (actual time=7.487..3,109.052 rows=6,083 loops=1)

  • Join Filter: (findocparmov.cd_tipo_cobranca = tcb.cd_tipo_cobranca)
  • Rows Removed by Join Filter: 66913
56. 8.311 3,061.346 ↓ 6,083.0 6,083 1

Nested Loop (cost=3.53..36.64 rows=1 width=362) (actual time=7.470..3,061.346 rows=6,083 loops=1)

57. 8.788 3,028.703 ↓ 6,083.0 6,083 1

Nested Loop (cost=3.25..36.33 rows=1 width=370) (actual time=7.451..3,028.703 rows=6,083 loops=1)

  • Join Filter: (pesend.seq_endereco = pesendtip.seq_endereco)
  • Rows Removed by Join Filter: 20
58. 5.708 2,977.194 ↓ 6,103.0 6,103 1

Nested Loop (cost=2.82..35.80 rows=1 width=394) (actual time=7.426..2,977.194 rows=6,103 loops=1)

59. 5.878 2,934.988 ↓ 6,083.0 6,083 1

Nested Loop (cost=2.40..35.28 rows=1 width=370) (actual time=7.409..2,934.988 rows=6,083 loops=1)

60. 6.009 2,892.612 ↓ 6,083.0 6,083 1

Nested Loop (cost=1.98..31.47 rows=1 width=318) (actual time=7.392..2,892.612 rows=6,083 loops=1)

61. 71.115 2,868.354 ↓ 6,083.0 6,083 1

Nested Loop (cost=1.84..31.30 rows=1 width=305) (actual time=7.381..2,868.354 rows=6,083 loops=1)

62. 127.158 2,156.937 ↓ 106,717.0 106,717 1

Nested Loop (cost=1.41..30.62 rows=1 width=246) (actual time=0.149..2,156.937 rows=106,717 loops=1)

  • Join Filter: (findocparmov.cd_operacao = opefin.cd_operacao)
63. 129.130 1,709.535 ↓ 106,748.0 106,748 1

Nested Loop (cost=1.27..30.39 rows=1 width=251) (actual time=0.130..1,709.535 rows=106,748 loops=1)

64. 221.948 1,260.161 ↓ 106,748.0 106,748 1

Nested Loop (cost=1.00..22.09 rows=1 width=203) (actual time=0.114..1,260.161 rows=106,748 loops=1)

65. 184.229 184.229 ↓ 106,748.0 106,748 1

Index Scan using fin_doc_parcela_mov_idx1 on fin_doc_parcela_mov findocparmov (cost=0.44..13.50 rows=1 width=139) (actual time=0.063..184.229 rows=106,748 loops=1)

  • Index Cond: ((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)))
  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 177430
66. 853.984 853.984 ↑ 1.0 1 106,748

Index Scan using fin_doc_parcela_pk on fin_doc_parcela findocpar (cost=0.56..8.58 rows=1 width=67) (actual time=0.008..0.008 rows=1 loops=106,748)

  • Index Cond: ((cd_empresa = 30) AND (cd_base = findocparmov.cd_base_orig) AND (seq_processo = findocparmov.seq_processo_orig) AND ((parcela)::text = (findocparmov.parcela_orig)::text))
  • Filter: (id_situacao_eletronica = ANY ('{0,9}'::bpchar[]))
67. 320.244 320.244 ↑ 1.0 1 106,748

Index Scan using operacao_pk on operacao ope (cost=0.27..8.29 rows=1 width=48) (actual time=0.003..0.003 rows=1 loops=106,748)

  • Index Cond: (cd_operacao = findocparmov.cd_operacao)
68. 320.244 320.244 ↑ 1.0 1 106,748

Index Scan using operacao_financ_pk on operacao_financ opefin (cost=0.14..0.22 rows=1 width=11) (actual time=0.003..0.003 rows=1 loops=106,748)

  • Index Cond: (cd_operacao = ope.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[])))
  • Rows Removed by Filter: 0
69. 640.302 640.302 ↓ 0.0 0 106,717

Index Scan using fin_documento_pk on fin_documento findoc (cost=0.43..0.67 rows=1 width=67) (actual time=0.006..0.006 rows=0 loops=106,717)

  • Index Cond: ((cd_empresa = 30) AND (cd_base = findocpar.cd_base) AND (seq_processo = findocpar.seq_processo))
  • Filter: ((cd_filial = 30) AND (id_cr_cp = 'R'::bpchar) AND (id_provisao = 'N'::bpchar))
  • Rows Removed by Filter: 1
70. 18.249 18.249 ↑ 1.0 1 6,083

Index Scan using tipo_doc_credito_pk on tipo_doc_credito tipdoccre (cost=0.14..0.16 rows=1 width=21) (actual time=0.002..0.003 rows=1 loops=6,083)

  • Index Cond: (cd_tipo_doc_credito = findoc.cd_tipo_doc_credito)
71. 36.498 36.498 ↑ 1.0 1 6,083

Index Scan using pessoa_pk on pessoa pes (cost=0.42..3.79 rows=1 width=52) (actual time=0.005..0.006 rows=1 loops=6,083)

  • Index Cond: (cd_pessoa = findoc.cd_pessoa)
72. 36.498 36.498 ↑ 1.0 1 6,083

Index Scan using pessoa_endereco_pk on pessoa_endereco pesend (cost=0.42..0.52 rows=1 width=24) (actual time=0.005..0.006 rows=1 loops=6,083)

  • Index Cond: (cd_pessoa = pes.cd_pessoa)
73. 42.721 42.721 ↑ 1.0 1 6,103

Index Scan using pessoa_endereco_tipo_uk1 on pessoa_endereco_tipo pesendtip (cost=0.42..0.51 rows=1 width=16) (actual time=0.006..0.007 rows=1 loops=6,103)

  • Index Cond: ((cd_pessoa = pes.cd_pessoa) AND ((id_tipo_endereco)::text = 'PRI'::text))
74. 24.332 24.332 ↑ 1.0 1 6,083

Index Only Scan using localidade_pk on localidade loc (cost=0.29..0.31 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=6,083)

  • Index Cond: (cd_localidade = pesend.cd_localidade)
  • Heap Fetches: 6083
75. 24.332 24.332 ↓ 1.1 12 6,083

Seq Scan on tipo_cobranca tcb (cost=0.00..1.11 rows=11 width=16) (actual time=0.002..0.004 rows=12 loops=6,083)

76. 60.649 60.830 ↑ 3.1 11 6,083

HashAggregate (cost=87.90..88.24 rows=34 width=490) (actual time=0.001..0.010 rows=11 loops=6,083)

  • Group Key: pesfil_2.cd_empresa, pesfil_2.cd_filial, pesfil_2.id_atividade, pesfil_2.cd_pessoa, pesfil_2.cd_segmento_fiscal, pesfil_2.cd_lista_preco_basica, pesfil_2.cd_pessoa_clas_fiscal, pesfil_2.id_perfil_sped_fiscal, pesfil_2.id_periodo_inventario, pesfil_2.mes_inventario_anual, pesfil_2.versao_leiaute_nfe, pesfil_2.id_formato_danfe, pesfil_2.id_ambiente_nfe, pesfil_2.cd_operacao_venda, pesfil_2.id_volume_trans, pesfil_2.id_utiliza_lacre_transp, pesfil_2.cd_tipo_cobranca, pesfil_2.cd_banco_portador, pesfil_2.nr_agencia_portador, pesfil_2.nr_conta_portador, pesfil_2.id_clas_cons_en_eletr, pesfil_2.id_tipo_ligacao_default, pesfil_2.id_grupo_tensao_default, pesfil_2.id_clas_cons_gas, pesfil_2.id_tipo_assinante_comunic, pesfil_2.id_clas_cons_agua, pesfil_2.cd_lista_preco_tipo_basico, pesfil_2.cd_lista_preco_prom, pesfil_2.cd_lista_preco_tipo_prom, pesfil_2.cd_grupo_unidade_medida, pesfil_2.id_ecf, pesfil_2.id_tipo_atualizacao_est, pesfil_2.id_atualizando_est, pesfil_2.dt_ult_fec_estoque, pesfil_2.mes_invent_sped_anual, pesfil_2.id_emite_nf_conjugada, pesfil_2.id_origem_tipo_preco, pesfil_2.cd_operacao_serv, pesfil_2.id_obriga_cd_barras_nfe, pesfil_2.id_ativo, pesfil_2.abrev_filial, pesfil_2.id_geracao_nfe, pesfil_2.id_matriz, pesfil_2.cd_perfil_filial, pesfil_2.id_venda_saldo_terc
77. 0.002 0.181 ↑ 3.1 11 1

Append (cost=28.43..84.08 rows=34 width=490) (actual time=0.119..0.181 rows=11 loops=1)

78. 0.001 0.021 ↓ 0.0 0 1

Nested Loop (cost=28.43..44.65 rows=3 width=212) (actual time=0.021..0.021 rows=0 loops=1)

79. 0.001 0.020 ↓ 0.0 0 1

Nested Loop (cost=0.69..16.82 rows=1 width=212) (actual time=0.020..0.020 rows=0 loops=1)

80. 0.000 0.019 ↓ 0.0 0 1

Nested Loop (cost=0.55..16.60 rows=1 width=16) (actual time=0.019..0.019 rows=0 loops=1)

81. 0.019 0.019 ↓ 0.0 0 1

Index Scan using operador_uk1 on operador ope_9 (cost=0.28..8.29 rows=1 width=9) (actual time=0.019..0.019 rows=0 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_filial_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
82. 0.000 0.000 ↓ 0.0 0

Index Only Scan using operador_pessoa_filial_pk on operador_pessoa_filial opepesfil_1 (cost=0.28..8.30 rows=1 width=24) (never executed)

  • Index Cond: ((cd_operador = (ope_9.cd_operador)::text) AND (cd_empresa = 30))
  • Heap Fetches: 0
83. 0.000 0.000 ↓ 0.0 0

Index Scan using pessoa_filial_pk on pessoa_filial pesfil_2 (cost=0.14..0.21 rows=1 width=212) (never executed)

  • Index Cond: ((cd_empresa = 30) AND (cd_filial = opepesfil_1.cd_filial))
84. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=27.74..27.77 rows=3 width=112) (never executed)

  • Group Key: pesemp_6.cd_empresa, pesemp_6.cd_pessoa, pesemp_6.cd_regime_fiscal, pesemp_6.dt_baixa, pesemp_6.dt_arq_atos_const, pesemp_6.dt_arq_conv_simp_empr, pesemp_6.coef_acresc_venda_ncoop, pesemp_6.id_cooperativa, pesemp_6.id_origem_tribut, pesemp_6.id_controla_fci, pesemp_6.nr_max_itens_nfe, pesemp_6.id_valida_cest_fat, pesemp_6.id_consiste_ncm_xml, pesemp_6.nr_dias_rev_cad_cli_ven
85. 0.000 0.000 ↓ 0.0 0

Append (cost=0.55..27.64 rows=3 width=112) (never executed)

86. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.55..17.96 rows=1 width=56) (never executed)

87. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.55..16.60 rows=1 width=8) (never executed)

88. 0.000 0.000 ↓ 0.0 0

Index Scan using operador_uk1 on operador ope_10 (cost=0.28..8.29 rows=1 width=9) (never executed)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'N'::bpchar)
89. 0.000 0.000 ↓ 0.0 0

Index Only Scan using operador_pessoa_empresa_pk on operador_pessoa_empresa opepesemp_3 (cost=0.28..8.29 rows=1 width=16) (never executed)

  • Index Cond: ((cd_operador = (ope_10.cd_operador)::text) AND (cd_empresa = 30))
  • Heap Fetches: 0
90. 0.000 0.000 ↓ 0.0 0

Seq Scan on pessoa_empresa pesemp_6 (cost=0.00..1.35 rows=1 width=56) (never executed)

  • Filter: (cd_empresa = 30)
91. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.28..9.65 rows=1 width=56) (never executed)

92. 0.000 0.000 ↓ 0.0 0

Index Scan using operador_uk1 on operador ope_11 (cost=0.28..8.29 rows=1 width=0) (never executed)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'S'::bpchar)
93. 0.000 0.000 ↓ 0.0 0

Seq Scan on pessoa_empresa pesemp_7 (cost=0.00..1.35 rows=1 width=56) (never executed)

  • Filter: (cd_empresa = 30)
94. 0.000 0.000 ↓ 0.0 0

Result (cost=0.00..0.00 rows=0 width=112) (never executed)

  • One-Time Filter: false
95. 0.028 0.157 ↑ 2.7 11 1

Nested Loop (cost=28.02..39.10 rows=30 width=212) (actual time=0.098..0.157 rows=11 loops=1)

96. 0.030 0.030 ↓ 1.1 11 1

Seq Scan on pessoa_filial pesfil_3 (cost=0.00..2.59 rows=10 width=212) (actual time=0.010..0.030 rows=11 loops=1)

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 36
97. 0.014 0.099 ↑ 3.0 1 11

Materialize (cost=28.02..36.14 rows=3 width=8) (actual time=0.008..0.009 rows=1 loops=11)

98. 0.001 0.085 ↑ 3.0 1 1

Nested Loop (cost=28.02..36.13 rows=3 width=8) (actual time=0.083..0.085 rows=1 loops=1)

99. 0.018 0.018 ↑ 1.0 1 1

Index Scan using operador_uk1 on operador ope_12 (cost=0.28..8.29 rows=1 width=0) (actual time=0.017..0.018 rows=1 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_filial_todos = 'S'::bpchar)
100. 0.010 0.066 ↑ 3.0 1 1

HashAggregate (cost=27.74..27.77 rows=3 width=112) (actual time=0.065..0.066 rows=1 loops=1)

  • Group Key: pesemp_8.cd_empresa, pesemp_8.cd_pessoa, pesemp_8.cd_regime_fiscal, pesemp_8.dt_baixa, pesemp_8.dt_arq_atos_const, pesemp_8.dt_arq_conv_simp_empr, pesemp_8.coef_acresc_venda_ncoop, pesemp_8.id_cooperativa, pesemp_8.id_origem_tribut, pesemp_8.id_controla_fci, pesemp_8.nr_max_itens_nfe, pesemp_8.id_valida_cest_fat, pesemp_8.id_consiste_ncm_xml, pesemp_8.nr_dias_rev_cad_cli_ven
101. 0.001 0.056 ↑ 3.0 1 1

Append (cost=0.55..27.64 rows=3 width=112) (actual time=0.048..0.056 rows=1 loops=1)

102. 0.001 0.017 ↓ 0.0 0 1

Nested Loop (cost=0.55..17.96 rows=1 width=56) (actual time=0.017..0.017 rows=0 loops=1)

103. 0.000 0.016 ↓ 0.0 0 1

Nested Loop (cost=0.55..16.60 rows=1 width=8) (actual time=0.016..0.016 rows=0 loops=1)

104. 0.016 0.016 ↓ 0.0 0 1

Index Scan using operador_uk1 on operador ope_13 (cost=0.28..8.29 rows=1 width=9) (actual time=0.016..0.016 rows=0 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
105. 0.000 0.000 ↓ 0.0 0

Index Only Scan using operador_pessoa_empresa_pk on operador_pessoa_empresa opepesemp_4 (cost=0.28..8.29 rows=1 width=16) (never executed)

  • Index Cond: ((cd_operador = (ope_13.cd_operador)::text) AND (cd_empresa = 30))
  • Heap Fetches: 0
106. 0.000 0.000 ↓ 0.0 0

Seq Scan on pessoa_empresa pesemp_8 (cost=0.00..1.35 rows=1 width=56) (never executed)

  • Filter: (cd_empresa = 30)
107. 0.001 0.037 ↑ 1.0 1 1

Nested Loop (cost=0.28..9.65 rows=1 width=56) (actual time=0.030..0.037 rows=1 loops=1)

108. 0.016 0.016 ↑ 1.0 1 1

Index Scan using operador_uk1 on operador ope_14 (cost=0.28..8.29 rows=1 width=0) (actual time=0.015..0.016 rows=1 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'S'::bpchar)
109. 0.020 0.020 ↑ 1.0 1 1

Seq Scan on pessoa_empresa pesemp_9 (cost=0.00..1.35 rows=1 width=56) (actual time=0.014..0.020 rows=1 loops=1)

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 27
110. 0.001 0.001 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=112) (actual time=0.001..0.001 rows=0 loops=1)

  • One-Time Filter: false
111. 0.001 0.001 ↓ 0.0 0 1

Result (cost=0.00..0.00 rows=0 width=490) (actual time=0.001..0.001 rows=0 loops=1)

  • One-Time Filter: false
112. 54.747 54.747 ↑ 2.0 1 6,083

Index Only Scan using processo_pk on processo pro (cost=0.56..1.23 rows=2 width=24) (actual time=0.008..0.009 rows=1 loops=6,083)

  • Index Cond: ((cd_empresa = 30) AND (cd_base = findocpar.cd_base) AND (seq_processo = findocpar.seq_processo))
  • Heap Fetches: 6083
113. 36.498 36.498 ↓ 0.0 0 6,083

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

  • 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
114. 5.794 5.794 ↓ 0.0 0 5,794

Index Scan using pessoa_associado_idx1 on pessoa_associado pesass (cost=0.15..0.22 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=5,794)

  • Index Cond: (cd_pessoa = pes.cd_pessoa)
  • Filter: (dt_demissao IS NULL)
115.          

SubPlan (forNested Loop Left Join)

116. 63.734 63.734 ↑ 1.0 1 5,794

Seq Scan on pessoa_empresa_plano pesemppla (cost=0.00..3.54 rows=1 width=8) (actual time=0.008..0.011 rows=1 loops=5,794)

  • Filter: ((cd_empresa = findocparmov.cd_empresa) AND (to_char((findocparmov.dt_credito)::timestamp with time zone, 'yyyy'::text) >= (ano_inicio_plano)::text) AND (to_char((findocparmov.dt_credito)::timestamp with time zone, 'yyyy'::text) <= (ano_fim_plano)::text))
  • Rows Removed by Filter: 27