explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bweQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.022 5,873.519 ↓ 1.4 50 1

Limit (cost=1,013.70..1,013.79 rows=35 width=1,040) (actual time=5,873.481..5,873.519 rows=50 loops=1)

2. 14.024 5,873.497 ↓ 1.4 50 1

Sort (cost=1,013.70..1,013.79 rows=35 width=1,040) (actual time=5,873.478..5,873.497 rows=50 loops=1)

  • Sort Key: (row_number() OVER (?))
  • Sort Method: top-N heapsort Memory: 50kB
3. 14.333 5,859.473 ↓ 165.1 5,779 1

WindowAgg (cost=1,011.93..1,012.80 rows=35 width=1,040) (actual time=5,841.774..5,859.473 rows=5,779 loops=1)

4. 213.598 5,845.140 ↓ 165.1 5,779 1

Sort (cost=1,011.93..1,012.01 rows=35 width=1,032) (actual time=5,841.758..5,845.140 rows=5,779 loops=1)

  • Sort Key: sqlunion.cd_empresa, sqlunion.cd_filial, sqlunion.dt_movimento, sqlunion.numero
  • Sort Method: quicksort Memory: 3172kB
5. 7.775 5,631.542 ↓ 165.1 5,779 1

Subquery Scan on sqlunion (cost=208.24..1,011.03 rows=35 width=1,032) (actual time=5,621.192..5,631.542 rows=5,779 loops=1)

6. 32.342 5,623.767 ↓ 165.1 5,779 1

HashSetOp Except All (cost=208.24..1,010.68 rows=35 width=1,036) (actual time=5,621.188..5,623.767 rows=5,779 loops=1)

7. 1.631 5,591.425 ↓ 111.1 5,779 1

Append (cost=208.24..1,004.44 rows=52 width=1,036) (actual time=11.123..5,591.425 rows=5,779 loops=1)

8. 3.538 3,075.405 ↓ 165.1 5,779 1

Subquery Scan on *SELECT* 1 (cost=208.24..675.71 rows=35 width=555) (actual time=11.121..3,075.405 rows=5,779 loops=1)

9. 51.922 3,071.867 ↓ 165.1 5,779 1

Nested Loop Anti Join (cost=208.24..675.36 rows=35 width=551) (actual time=11.119..3,071.867 rows=5,779 loops=1)

10. 6.642 2,919.986 ↓ 168.5 6,065 1

Hash Join (cost=207.82..244.51 rows=36 width=414) (actual time=10.680..2,919.986 rows=6,065 loops=1)

  • Hash Cond: (findocparmov.cd_filial_mov = pesfilmov.cd_filial)
11. 3.095 2,912.861 ↓ 144.4 6,065 1

Nested Loop (cost=118.82..154.98 rows=42 width=376) (actual time=10.168..2,912.861 rows=6,065 loops=1)

12. 0.045 0.261 ↑ 7.0 1 1

HashAggregate (cost=86.84..86.91 rows=7 width=490) (actual time=0.260..0.261 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
13. 0.004 0.216 ↑ 7.0 1 1

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

14. 0.000 0.025 ↓ 0.0 0 1

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

15. 0.002 0.025 ↓ 0.0 0 1

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

16. 0.000 0.023 ↓ 0.0 0 1

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

17. 0.023 0.023 ↓ 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.023..0.023 rows=0 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_filial_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
18. 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
19. 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))
20. 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
21. 0.000 0.000 ↓ 0.0 0

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

22. 0.000 0.000 ↓ 0.0 0

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

23. 0.000 0.000 ↓ 0.0 0

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

24. 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)
25. 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
26. 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)
27. 0.000 0.000 ↓ 0.0 0

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

28. 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)
29. 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)
30. 0.000 0.000 ↓ 0.0 0

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

  • One-Time Filter: false
31. 0.003 0.186 ↑ 3.0 1 1

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

32. 0.004 0.061 ↑ 1.0 1 1

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

33. 0.019 0.019 ↑ 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.018..0.019 rows=1 loops=1)

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

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

  • Filter: ((cd_empresa = 30) AND (cd_filial = 30))
  • Rows Removed by Filter: 46
35. 0.014 0.122 ↑ 3.0 1 1

HashAggregate (cost=27.74..27.77 rows=3 width=112) (actual time=0.122..0.122 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
36. 0.005 0.108 ↑ 3.0 1 1

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

37. 0.001 0.022 ↓ 0.0 0 1

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

38. 0.000 0.021 ↓ 0.0 0 1

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

39. 0.021 0.021 ↓ 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.021..0.021 rows=0 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
40. 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
41. 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)
42. 0.001 0.081 ↑ 1.0 1 1

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

43. 0.020 0.020 ↑ 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.019..0.020 rows=1 loops=1)

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

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

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 27
45. 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
46. 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
47. 12.951 2,909.505 ↓ 1,010.8 6,065 1

Materialize (cost=31.98..67.50 rows=6 width=346) (actual time=9.905..2,909.505 rows=6,065 loops=1)

48. 3.147 2,896.554 ↓ 1,010.8 6,065 1

Nested Loop (cost=31.98..67.47 rows=6 width=346) (actual time=9.894..2,896.554 rows=6,065 loops=1)

49. 0.021 0.091 ↑ 3.0 1 1

HashAggregate (cost=27.74..27.77 rows=3 width=112) (actual time=0.089..0.091 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
50. 0.002 0.070 ↑ 3.0 1 1

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

51. 0.001 0.023 ↓ 0.0 0 1

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

52. 0.001 0.022 ↓ 0.0 0 1

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

53. 0.021 0.021 ↓ 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.021..0.021 rows=0 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
54. 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
55. 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)
56. 0.000 0.044 ↑ 1.0 1 1

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

57. 0.020 0.020 ↑ 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.019..0.020 rows=1 loops=1)

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

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

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 27
59. 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
60. 13.545 2,893.316 ↓ 3,032.5 6,065 1

Materialize (cost=4.24..39.60 rows=2 width=338) (actual time=9.803..2,893.316 rows=6,065 loops=1)

61. 6.074 2,879.771 ↓ 3,032.5 6,065 1

Nested Loop (cost=4.24..39.59 rows=2 width=338) (actual time=9.793..2,879.771 rows=6,065 loops=1)

62. 27.592 2,813.047 ↓ 6,065.0 6,065 1

Nested Loop (cost=3.68..38.34 rows=1 width=370) (actual time=9.706..2,813.047 rows=6,065 loops=1)

  • Join Filter: (findocparmov.cd_tipo_cobranca = tcb.cd_tipo_cobranca)
  • Rows Removed by Join Filter: 66715
63. 8.192 2,767.260 ↓ 6,065.0 6,065 1

Nested Loop (cost=3.68..37.09 rows=1 width=370) (actual time=9.670..2,767.260 rows=6,065 loops=1)

64. 7.598 2,734.808 ↓ 6,065.0 6,065 1

Nested Loop (cost=3.40..36.78 rows=1 width=378) (actual time=9.602..2,734.808 rows=6,065 loops=1)

  • Join Filter: (pes.cd_pessoa = pesend.cd_pessoa)
65. 5.293 2,684.755 ↓ 6,065.0 6,065 1

Nested Loop (cost=2.98..36.25 rows=1 width=394) (actual time=9.529..2,684.755 rows=6,065 loops=1)

66. 4.092 2,630.942 ↓ 6,065.0 6,065 1

Nested Loop Left Join (cost=2.55..35.73 rows=1 width=378) (actual time=9.464..2,630.942 rows=6,065 loops=1)

67. 6.933 2,602.590 ↓ 6,065.0 6,065 1

Nested Loop Left Join (cost=2.28..35.17 rows=1 width=346) (actual time=9.446..2,602.590 rows=6,065 loops=1)

68. 10.542 2,589.592 ↓ 6,065.0 6,065 1

Nested Loop (cost=2.13..34.94 rows=1 width=338) (actual time=9.438..2,589.592 rows=6,065 loops=1)

69. 6.293 2,542.660 ↓ 6,065.0 6,065 1

Nested Loop (cost=1.71..31.13 rows=1 width=286) (actual time=9.388..2,542.660 rows=6,065 loops=1)

70. 94.659 2,518.172 ↓ 6,065.0 6,065 1

Nested Loop (cost=1.57..30.96 rows=1 width=273) (actual time=9.374..2,518.172 rows=6,065 loops=1)

71. 135.506 1,783.943 ↓ 106,595.0 106,595 1

Nested Loop (cost=1.14..30.28 rows=1 width=214) (actual time=0.383..1,783.943 rows=106,595 loops=1)

72. 161.782 1,328.559 ↓ 106,626.0 106,626 1

Nested Loop (cost=1.00..22.09 rows=1 width=203) (actual time=0.333..1,328.559 rows=106,626 loops=1)

73. 207.143 207.143 ↓ 106,626.0 106,626 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.121..207.143 rows=106,626 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: 177337
74. 959.634 959.634 ↑ 1.0 1 106,626

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.009 rows=1 loops=106,626)

  • 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[]))
75. 319.878 319.878 ↑ 1.0 1 106,626

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

  • 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[])))
  • Rows Removed by Filter: 0
76. 639.570 639.570 ↓ 0.0 0 106,595

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,595)

  • 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
77. 18.195 18.195 ↑ 1.0 1 6,065

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,065)

  • Index Cond: (cd_tipo_doc_credito = findoc.cd_tipo_doc_credito)
78. 36.390 36.390 ↑ 1.0 1 6,065

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

  • Index Cond: (cd_pessoa = findoc.cd_pessoa)
79. 6.065 6.065 ↓ 0.0 0 6,065

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=6,065)

  • Index Cond: (cd_pessoa = pes.cd_pessoa)
  • Filter: (dt_demissao IS NULL)
80. 24.260 24.260 ↑ 1.0 1 6,065

Index Scan using operacao_pk on operacao ope (cost=0.27..0.55 rows=1 width=48) (actual time=0.003..0.004 rows=1 loops=6,065)

  • Index Cond: (cd_operacao = opefin.cd_operacao)
81. 48.520 48.520 ↑ 1.0 1 6,065

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

  • Index Cond: ((cd_pessoa = pes.cd_pessoa) AND ((id_tipo_endereco)::text = 'PRI'::text))
82. 42.455 42.455 ↑ 1.0 1 6,065

Index Scan using pessoa_endereco_pk on pessoa_endereco pesend (cost=0.42..0.51 rows=1 width=24) (actual time=0.006..0.007 rows=1 loops=6,065)

  • Index Cond: ((cd_pessoa = pesendtip.cd_pessoa) AND (seq_endereco = pesendtip.seq_endereco))
83. 24.260 24.260 ↑ 1.0 1 6,065

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,065)

  • Index Cond: (cd_localidade = pesend.cd_localidade)
  • Heap Fetches: 6065
84. 18.195 18.195 ↓ 1.1 12 6,065

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

85. 60.650 60.650 ↑ 2.0 1 6,065

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

  • Index Cond: ((cd_empresa = 30) AND (cd_base = findocpar.cd_base) AND (seq_processo = findocpar.seq_processo))
  • Heap Fetches: 6065
86. 0.017 0.483 ↑ 3.1 11 1

Hash (cost=88.58..88.58 rows=34 width=54) (actual time=0.483..0.483 rows=11 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
87. 0.005 0.466 ↑ 3.1 11 1

Subquery Scan on pesfilmov (cost=87.90..88.58 rows=34 width=54) (actual time=0.440..0.466 rows=11 loops=1)

88. 0.140 0.461 ↑ 3.1 11 1

HashAggregate (cost=87.90..88.24 rows=34 width=490) (actual time=0.439..0.461 rows=11 loops=1)

  • 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
89. 0.005 0.321 ↑ 3.1 11 1

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

90. 0.000 0.062 ↓ 0.0 0 1

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

91. 0.001 0.062 ↓ 0.0 0 1

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

92. 0.001 0.061 ↓ 0.0 0 1

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

93. 0.060 0.060 ↓ 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.060..0.060 rows=0 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_filial_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
94. 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
95. 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))
96. 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
97. 0.000 0.000 ↓ 0.0 0

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

98. 0.000 0.000 ↓ 0.0 0

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

99. 0.000 0.000 ↓ 0.0 0

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

100. 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)
101. 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
102. 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)
103. 0.000 0.000 ↓ 0.0 0

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

104. 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)
105. 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)
106. 0.000 0.000 ↓ 0.0 0

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

  • One-Time Filter: false
107. 0.030 0.253 ↑ 2.7 11 1

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

108. 0.080 0.080 ↓ 1.1 11 1

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

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 36
109. 0.018 0.143 ↑ 3.0 1 11

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

110. 0.005 0.125 ↑ 3.0 1 1

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

111. 0.025 0.025 ↑ 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.024..0.025 rows=1 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_filial_todos = 'S'::bpchar)
112. 0.019 0.095 ↑ 3.0 1 1

HashAggregate (cost=27.74..27.77 rows=3 width=112) (actual time=0.094..0.095 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
113. 0.001 0.076 ↑ 3.0 1 1

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

114. 0.001 0.022 ↓ 0.0 0 1

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

115. 0.000 0.021 ↓ 0.0 0 1

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

116. 0.021 0.021 ↓ 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.021..0.021 rows=0 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
117. 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
118. 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)
119. 0.003 0.052 ↑ 1.0 1 1

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

120. 0.020 0.020 ↑ 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.019..0.020 rows=1 loops=1)

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

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

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 27
122. 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
123. 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
124. 36.390 36.390 ↓ 0.0 0 6,065

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,065)

  • 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: 286
125.          

SubPlan (forNested Loop Anti Join)

126. 63.569 63.569 ↑ 1.0 1 5,779

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,779)

  • 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
127. 0.001 2,514.389 ↓ 0.0 0 1

Subquery Scan on *SELECT* 2 (cost=221.32..328.73 rows=17 width=555) (actual time=2,514.389..2,514.389 rows=0 loops=1)

128. 0.002 2,514.388 ↓ 0.0 0 1

Nested Loop (cost=221.32..328.56 rows=17 width=551) (actual time=2,514.388..2,514.388 rows=0 loops=1)

129. 0.014 0.124 ↑ 7.0 1 1

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

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

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

131. 0.000 0.018 ↓ 0.0 0 1

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

132. 0.001 0.018 ↓ 0.0 0 1

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

133. 0.001 0.017 ↓ 0.0 0 1

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

134. 0.016 0.016 ↓ 0.0 0 1

Index Scan using operador_uk1 on operador ope_16 (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_filial_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
135. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

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

139. 0.000 0.000 ↓ 0.0 0

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

140. 0.000 0.000 ↓ 0.0 0

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

141. 0.000 0.000 ↓ 0.0 0

Index Scan using operador_uk1 on operador ope_17 (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)
142. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

145. 0.000 0.000 ↓ 0.0 0

Index Scan using operador_uk1 on operador ope_18 (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)
146. 0.000 0.000 ↓ 0.0 0

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

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

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

  • One-Time Filter: false
148. 0.004 0.090 ↑ 3.0 1 1

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

149. 0.003 0.033 ↑ 1.0 1 1

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

150. 0.009 0.009 ↑ 1.0 1 1

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

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

Seq Scan on pessoa_filial pesfil_5 (cost=0.00..2.71 rows=1 width=212) (actual time=0.015..0.021 rows=1 loops=1)

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

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

  • Group Key: pesemp_12.cd_empresa, pesemp_12.cd_pessoa, pesemp_12.cd_regime_fiscal, pesemp_12.dt_baixa, pesemp_12.dt_arq_atos_const, pesemp_12.dt_arq_conv_simp_empr, pesemp_12.coef_acresc_venda_ncoop, pesemp_12.id_cooperativa, pesemp_12.id_origem_tribut, pesemp_12.id_controla_fci, pesemp_12.nr_max_itens_nfe, pesemp_12.id_valida_cest_fat, pesemp_12.id_consiste_ncm_xml, pesemp_12.nr_dias_rev_cad_cli_ven
153. 0.000 0.038 ↑ 3.0 1 1

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

154. 0.002 0.010 ↓ 0.0 0 1

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

155. 0.000 0.008 ↓ 0.0 0 1

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

156. 0.008 0.008 ↓ 0.0 0 1

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

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

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

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

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

  • Filter: (cd_empresa = 30)
159. 0.002 0.027 ↑ 1.0 1 1

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

160. 0.009 0.009 ↑ 1.0 1 1

Index Scan using operador_uk1 on operador ope_21 (cost=0.28..8.29 rows=1 width=0) (actual time=0.008..0.009 rows=1 loops=1)

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

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

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 27
162. 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
163. 0.000 0.000 ↓ 0.0 0 1

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

  • One-Time Filter: false
164. 0.005 2,514.262 ↓ 0.0 0 1

Materialize (cost=134.48..180.12 rows=3 width=384) (actual time=2,514.262..2,514.262 rows=0 loops=1)

165. 0.001 2,514.257 ↓ 0.0 0 1

Nested Loop (cost=134.48..180.11 rows=3 width=384) (actual time=2,514.257..2,514.257 rows=0 loops=1)

166. 0.001 2,514.256 ↓ 0.0 0 1

Nested Loop Anti Join (cost=106.74..152.28 rows=1 width=376) (actual time=2,514.256..2,514.256 rows=0 loops=1)

167. 0.002 2,514.255 ↓ 0.0 0 1

Nested Loop (cost=106.33..135.81 rows=1 width=376) (actual time=2,514.255..2,514.255 rows=0 loops=1)

  • Join Filter: (findocparmov_1.cd_filial_mov = pesfil_6.cd_filial)
168. 0.202 2,514.253 ↓ 0.0 0 1

Nested Loop (cost=18.43..46.81 rows=1 width=338) (actual time=2,514.253..2,514.253 rows=0 loops=1)

169. 0.542 2,512.908 ↓ 381.0 381 1

Nested Loop (cost=18.28..46.63 rows=1 width=346) (actual time=780.771..2,512.908 rows=381 loops=1)

170. 0.467 2,509.318 ↓ 381.0 381 1

Nested Loop (cost=17.72..45.18 rows=1 width=370) (actual time=780.736..2,509.318 rows=381 loops=1)

171. 7.495 2,506.184 ↓ 381.0 381 1

Nested Loop (cost=17.16..43.93 rows=1 width=402) (actual time=780.693..2,506.184 rows=381 loops=1)

172. 25.560 2,462.299 ↓ 6,065.0 6,065 1

Nested Loop (cost=16.60..35.34 rows=1 width=370) (actual time=297.349..2,462.299 rows=6,065 loops=1)

  • Join Filter: (findocparmov_1.cd_tipo_cobranca = tcb_1.cd_tipo_cobranca)
  • Rows Removed by Join Filter: 66715
173. 6.652 2,418.544 ↓ 6,065.0 6,065 1

Nested Loop (cost=16.60..34.09 rows=1 width=370) (actual time=297.331..2,418.544 rows=6,065 loops=1)

174. 6.677 2,387.632 ↓ 6,065.0 6,065 1

Nested Loop (cost=16.32..33.78 rows=1 width=378) (actual time=297.313..2,387.632 rows=6,065 loops=1)

  • Join Filter: (pes_1.cd_pessoa = pesend_1.cd_pessoa)
175. 10.111 2,344.565 ↓ 6,065.0 6,065 1

Nested Loop (cost=15.90..33.25 rows=1 width=394) (actual time=297.292..2,344.565 rows=6,065 loops=1)

176. 9.275 2,298.064 ↓ 6,065.0 6,065 1

Nested Loop Left Join (cost=15.48..32.73 rows=1 width=378) (actual time=297.276..2,298.064 rows=6,065 loops=1)

177. 6.076 2,270.594 ↓ 6,065.0 6,065 1

Nested Loop Left Join (cost=15.20..32.25 rows=1 width=346) (actual time=297.263..2,270.594 rows=6,065 loops=1)

178. 6.490 2,258.453 ↓ 6,065.0 6,065 1

Nested Loop (cost=15.05..32.02 rows=1 width=338) (actual time=297.257..2,258.453 rows=6,065 loops=1)

179. 4.805 2,215.573 ↓ 6,065.0 6,065 1

Nested Loop (cost=14.63..28.21 rows=1 width=286) (actual time=297.242..2,215.573 rows=6,065 loops=1)

180. 98.102 2,192.573 ↓ 6,065.0 6,065 1

Nested Loop (cost=14.49..28.04 rows=1 width=273) (actual time=297.231..2,192.573 rows=6,065 loops=1)

181. 104.674 1,454.901 ↓ 106,595.0 106,595 1

Nested Loop (cost=14.06..27.36 rows=1 width=214) (actual time=297.052..1,454.901 rows=106,595 loops=1)

182. 93.779 390.872 ↓ 106,595.0 106,595 1

Hash Join (cost=13.51..18.77 rows=1 width=150) (actual time=297.004..390.872 rows=106,595 loops=1)

  • Hash Cond: (opefin_1.cd_operacao = findocparmov_1.cd_operacao)
183. 0.142 0.142 ↓ 1.1 216 1

Seq Scan on operacao_financ opefin_1 (cost=0.00..4.51 rows=197 width=11) (actual time=0.010..0.142 rows=216 loops=1)

  • Filter: ((id_tipo_operacao)::text <> 'EP'::text)
  • Rows Removed by Filter: 3
184. 96.168 296.951 ↓ 106,626.0 106,626 1

Hash (cost=13.50..13.50 rows=1 width=139) (actual time=296.951..296.951 rows=106,626 loops=1)

  • Buckets: 131072 (originally 1024) Batches: 1 (originally 1) Memory Usage: 20179kB
185. 200.783 200.783 ↓ 106,626.0 106,626 1

Index Scan using fin_doc_parcela_mov_idx1 on fin_doc_parcela_mov findocparmov_1 (cost=0.44..13.50 rows=1 width=139) (actual time=0.037..200.783 rows=106,626 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: 177337
186. 959.355 959.355 ↑ 1.0 1 106,595

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

  • Index Cond: ((cd_empresa = 30) AND (cd_base = findocparmov_1.cd_base_orig) AND (seq_processo = findocparmov_1.seq_processo_orig) AND ((parcela)::text = (findocparmov_1.parcela_orig)::text))
  • Filter: (id_situacao_eletronica = ANY ('{0,9}'::bpchar[]))
187. 639.570 639.570 ↓ 0.0 0 106,595

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

  • Index Cond: ((cd_empresa = 30) AND (cd_base = findocpar_1.cd_base) AND (seq_processo = findocpar_1.seq_processo))
  • Filter: ((cd_filial = 30) AND (id_cr_cp = 'R'::bpchar) AND (id_provisao = 'N'::bpchar))
  • Rows Removed by Filter: 1
188. 18.195 18.195 ↑ 1.0 1 6,065

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

  • Index Cond: (cd_tipo_doc_credito = findoc_1.cd_tipo_doc_credito)
189. 36.390 36.390 ↑ 1.0 1 6,065

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

  • Index Cond: (cd_pessoa = findoc_1.cd_pessoa)
190. 6.065 6.065 ↓ 0.0 0 6,065

Index Scan using pessoa_associado_idx1 on pessoa_associado pesass_1 (cost=0.15..0.22 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=6,065)

  • Index Cond: (cd_pessoa = pes_1.cd_pessoa)
  • Filter: (dt_demissao IS NULL)
191. 18.195 18.195 ↑ 1.0 1 6,065

Index Scan using operacao_pk on operacao ope_15 (cost=0.27..0.47 rows=1 width=48) (actual time=0.003..0.003 rows=1 loops=6,065)

  • Index Cond: (cd_operacao = opefin_1.cd_operacao)
192. 36.390 36.390 ↑ 1.0 1 6,065

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

  • Index Cond: ((cd_pessoa = pes_1.cd_pessoa) AND ((id_tipo_endereco)::text = 'PRI'::text))
193. 36.390 36.390 ↑ 1.0 1 6,065

Index Scan using pessoa_endereco_pk on pessoa_endereco pesend_1 (cost=0.42..0.51 rows=1 width=24) (actual time=0.005..0.006 rows=1 loops=6,065)

  • Index Cond: ((cd_pessoa = pesendtip_1.cd_pessoa) AND (seq_endereco = pesendtip_1.seq_endereco))
194. 24.260 24.260 ↑ 1.0 1 6,065

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

  • Index Cond: (cd_localidade = pesend_1.cd_localidade)
  • Heap Fetches: 6065
195. 18.195 18.195 ↓ 1.1 12 6,065

Seq Scan on tipo_cobranca tcb_1 (cost=0.00..1.11 rows=11 width=16) (actual time=0.002..0.003 rows=12 loops=6,065)

196. 36.390 36.390 ↓ 0.0 0 6,065

Index Scan using fin_doc_parcela_mov_vin_idx1 on fin_doc_parcela_mov_vin findocparmovvin (cost=0.56..8.58 rows=1 width=56) (actual time=0.006..0.006 rows=0 loops=6,065)

  • Index Cond: ((cd_empresa = 30) AND (cd_base_vin = findocparmov_1.cd_base) AND (seq_processo_vin = findocparmov_1.seq_processo) AND (seq_mov_vin = findocparmov_1.seq_mov))
197. 2.667 2.667 ↑ 2.0 1 381

Index Only Scan using processo_pk on processo pro_1 (cost=0.56..1.23 rows=2 width=24) (actual time=0.006..0.007 rows=1 loops=381)

  • Index Cond: ((cd_empresa = 30) AND (cd_base = findocpar_1.cd_base) AND (seq_processo = findocpar_1.seq_processo))
  • Heap Fetches: 381
198. 3.048 3.048 ↑ 1.0 1 381

Index Scan using fin_doc_parcela_mov_pk on fin_doc_parcela_mov aux (cost=0.56..1.44 rows=1 width=40) (actual time=0.008..0.008 rows=1 loops=381)

  • Index Cond: ((cd_empresa = 30) AND (cd_base = findocparmovvin.cd_base) AND (seq_processo = findocparmovvin.seq_processo) AND (seq_mov = findocparmovvin.seq_mov))
199. 1.143 1.143 ↓ 0.0 0 381

Index Scan using operacao_financ_pk on operacao_financ opefinaux (cost=0.14..0.17 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=381)

  • Index Cond: (cd_operacao = aux.cd_operacao)
  • Filter: ((id_tipo_operacao)::text = 'EP'::text)
  • Rows Removed by Filter: 1
200. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=87.90..88.24 rows=34 width=490) (never executed)

  • Group Key: pesfil_6.cd_empresa, pesfil_6.cd_filial, pesfil_6.id_atividade, pesfil_6.cd_pessoa, pesfil_6.cd_segmento_fiscal, pesfil_6.cd_lista_preco_basica, pesfil_6.cd_pessoa_clas_fiscal, pesfil_6.id_perfil_sped_fiscal, pesfil_6.id_periodo_inventario, pesfil_6.mes_inventario_anual, pesfil_6.versao_leiaute_nfe, pesfil_6.id_formato_danfe, pesfil_6.id_ambiente_nfe, pesfil_6.cd_operacao_venda, pesfil_6.id_volume_trans, pesfil_6.id_utiliza_lacre_transp, pesfil_6.cd_tipo_cobranca, pesfil_6.cd_banco_portador, pesfil_6.nr_agencia_portador, pesfil_6.nr_conta_portador, pesfil_6.id_clas_cons_en_eletr, pesfil_6.id_tipo_ligacao_default, pesfil_6.id_grupo_tensao_default, pesfil_6.id_clas_cons_gas, pesfil_6.id_tipo_assinante_comunic, pesfil_6.id_clas_cons_agua, pesfil_6.cd_lista_preco_tipo_basico, pesfil_6.cd_lista_preco_prom, pesfil_6.cd_lista_preco_tipo_prom, pesfil_6.cd_grupo_unidade_medida, pesfil_6.id_ecf, pesfil_6.id_tipo_atualizacao_est, pesfil_6.id_atualizando_est, pesfil_6.dt_ult_fec_estoque, pesfil_6.mes_invent_sped_anual, pesfil_6.id_emite_nf_conjugada, pesfil_6.id_origem_tipo_preco, pesfil_6.cd_operacao_serv, pesfil_6.id_obriga_cd_barras_nfe, pesfil_6.id_ativo, pesfil_6.abrev_filial, pesfil_6.id_geracao_nfe, pesfil_6.id_matriz, pesfil_6.cd_perfil_filial, pesfil_6.id_venda_saldo_terc
201. 0.000 0.000 ↓ 0.0 0

Append (cost=28.43..84.08 rows=34 width=490) (never executed)

202. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=28.43..44.65 rows=3 width=212) (never executed)

203. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.69..16.82 rows=1 width=212) (never executed)

204. 0.000 0.000 ↓ 0.0 0

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

205. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

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

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

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

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

210. 0.000 0.000 ↓ 0.0 0

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

211. 0.000 0.000 ↓ 0.0 0

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

212. 0.000 0.000 ↓ 0.0 0

Index Scan using operador_uk1 on operador ope_23 (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)
213. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

216. 0.000 0.000 ↓ 0.0 0

Index Scan using operador_uk1 on operador ope_24 (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)
217. 0.000 0.000 ↓ 0.0 0

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

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

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

  • One-Time Filter: false
219. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=28.02..39.10 rows=30 width=212) (never executed)

220. 0.000 0.000 ↓ 0.0 0

Seq Scan on pessoa_filial pesfil_7 (cost=0.00..2.59 rows=10 width=212) (never executed)

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

Materialize (cost=28.02..36.14 rows=3 width=8) (never executed)

222. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=28.02..36.13 rows=3 width=8) (never executed)

223. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

226. 0.000 0.000 ↓ 0.0 0

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

227. 0.000 0.000 ↓ 0.0 0

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

228. 0.000 0.000 ↓ 0.0 0

Index Scan using operador_uk1 on operador ope_26 (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)
229. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

232. 0.000 0.000 ↓ 0.0 0

Index Scan using operador_uk1 on operador ope_27 (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)
233. 0.000 0.000 ↓ 0.0 0

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

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

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

  • One-Time Filter: false
235. 0.000 0.000 ↓ 0.0 0

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

  • One-Time Filter: false
236. 0.000 0.000 ↓ 0.0 0

Index Only Scan using processo_canc_pk on processo_canc procan_1 (cost=0.41..8.44 rows=1 width=24) (never executed)

  • Index Cond: ((cd_empresa = findocparmov_1.cd_empresa) AND (cd_empresa = 30) AND (cd_base = findocparmov_1.cd_base) AND (seq_processo = findocparmov_1.seq_processo))
  • Heap Fetches: 0
237. 0.000 0.000 ↓ 0.0 0

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

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

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

239. 0.000 0.000 ↓ 0.0 0

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

240. 0.000 0.000 ↓ 0.0 0

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

241. 0.000 0.000 ↓ 0.0 0

Index Scan using operador_uk1 on operador ope_28 (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)
242. 0.000 0.000 ↓ 0.0 0

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

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

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

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

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

245. 0.000 0.000 ↓ 0.0 0

Index Scan using operador_uk1 on operador ope_29 (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)
246. 0.000 0.000 ↓ 0.0 0

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

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

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

  • One-Time Filter: false
248.          

SubPlan (forNested Loop)

249. 0.000 0.000 ↓ 0.0 0

Seq Scan on pessoa_empresa_plano pesemppla_1 (cost=0.00..3.54 rows=1 width=8) (never executed)

  • Filter: ((cd_empresa = findocparmov_1.cd_empresa) AND (to_char((findocparmov_1.dt_credito)::timestamp with time zone, 'yyyy'::text) >= (ano_inicio_plano)::text) AND (to_char((findocparmov_1.dt_credito)::timestamp with time zone, 'yyyy'::text) <= (ano_fim_plano)::text))