explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ixpn

Settings
# exclusive inclusive rows x rows loops node
1. 0.014 6,202.482 ↓ 1.4 50 1

Limit (cost=1,020.70..1,020.79 rows=35 width=1,040) (actual time=6,202.463..6,202.482 rows=50 loops=1)

2. 9.180 6,202.468 ↓ 1.4 50 1

Sort (cost=1,020.70..1,020.79 rows=35 width=1,040) (actual time=6,202.460..6,202.468 rows=50 loops=1)

  • Sort Key: (row_number() OVER (?))
  • Sort Method: top-N heapsort Memory: 50kB
3. 8.648 6,193.288 ↓ 165.5 5,792 1

WindowAgg (cost=1,018.93..1,019.81 rows=35 width=1,040) (actual time=6,182.744..6,193.288 rows=5,792 loops=1)

4. 136.670 6,184.640 ↓ 165.5 5,792 1

Sort (cost=1,018.93..1,019.02 rows=35 width=1,032) (actual time=6,182.728..6,184.640 rows=5,792 loops=1)

  • Sort Key: sqlunion.cd_empresa, sqlunion.cd_filial, sqlunion.dt_movimento, sqlunion.numero
  • Sort Method: quicksort Memory: 3179kB
5. 6.184 6,047.970 ↓ 165.5 5,792 1

Subquery Scan on sqlunion (cost=207.13..1,018.03 rows=35 width=1,032) (actual time=6,039.635..6,047.970 rows=5,792 loops=1)

6. 36.162 6,041.786 ↓ 165.5 5,792 1

HashSetOp Except All (cost=207.13..1,017.68 rows=35 width=1,036) (actual time=6,039.631..6,041.786 rows=5,792 loops=1)

7. 1.840 6,005.624 ↓ 111.4 5,792 1

Append (cost=207.13..1,011.44 rows=52 width=1,036) (actual time=10.531..6,005.624 rows=5,792 loops=1)

8. 3.900 3,710.948 ↓ 165.5 5,792 1

Subquery Scan on *SELECT* 1 (cost=207.13..682.72 rows=35 width=555) (actual time=10.531..3,710.948 rows=5,792 loops=1)

9. 64.120 3,707.048 ↓ 165.5 5,792 1

Nested Loop Left Join (cost=207.13..682.37 rows=35 width=551) (actual time=10.528..3,707.048 rows=5,792 loops=1)

10. 8.193 3,567.632 ↓ 165.5 5,792 1

Nested Loop Anti Join (cost=206.98..547.30 rows=35 width=406) (actual time=10.354..3,567.632 rows=5,792 loops=1)

11. 3.368 3,522.953 ↓ 168.9 6,081 1

Nested Loop (cost=206.57..243.45 rows=36 width=406) (actual time=10.319..3,522.953 rows=6,081 loops=1)

12. 0.051 0.338 ↑ 7.0 1 1

HashAggregate (cost=86.84..86.91 rows=7 width=490) (actual time=0.337..0.338 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.287 ↑ 7.0 1 1

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

14. 0.001 0.059 ↓ 0.0 0 1

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

15. 0.002 0.058 ↓ 0.0 0 1

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

16. 0.000 0.056 ↓ 0.0 0 1

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

17. 0.056 0.056 ↓ 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.056..0.056 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.005 0.223 ↑ 3.0 1 1

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

32. 0.008 0.095 ↑ 1.0 1 1

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

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

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

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

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

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

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

37. 0.000 0.028 ↓ 0.0 0 1

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

38. 0.002 0.028 ↓ 0.0 0 1

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

39. 0.026 0.026 ↓ 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.026..0.026 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.005 0.064 ↑ 1.0 1 1

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

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

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

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

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 27
45. 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
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. 14.884 3,519.247 ↓ 1,216.2 6,081 1

Materialize (cost=119.73..156.05 rows=5 width=376) (actual time=9.980..3,519.247 rows=6,081 loops=1)

48. 3.434 3,504.363 ↓ 1,216.2 6,081 1

Nested Loop (cost=119.73..156.03 rows=5 width=376) (actual time=9.968..3,504.363 rows=6,081 loops=1)

49. 0.019 0.119 ↑ 3.0 1 1

HashAggregate (cost=27.74..27.77 rows=3 width=112) (actual time=0.119..0.119 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.003 0.100 ↑ 3.0 1 1

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

51. 0.001 0.031 ↓ 0.0 0 1

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

52. 0.001 0.030 ↓ 0.0 0 1

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

53. 0.029 0.029 ↓ 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.029..0.029 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.002 0.065 ↑ 1.0 1 1

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

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

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

Seq Scan on pessoa_empresa pesemp_5 (cost=0.00..1.35 rows=1 width=56) (actual time=0.030..0.037 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. 15.231 3,500.810 ↓ 3,040.5 6,081 1

Materialize (cost=91.99..128.16 rows=2 width=368) (actual time=9.845..3,500.810 rows=6,081 loops=1)

61. 10.431 3,485.579 ↓ 3,040.5 6,081 1

Nested Loop (cost=91.99..128.15 rows=2 width=368) (actual time=9.834..3,485.579 rows=6,081 loops=1)

62. 18.442 3,420.419 ↓ 6,081.0 6,081 1

Nested Loop (cost=91.43..126.90 rows=1 width=400) (actual time=9.794..3,420.419 rows=6,081 loops=1)

  • Join Filter: (findocparmov.cd_filial_mov = pesfil_2.cd_filial)
  • Rows Removed by Join Filter: 60810
63. 28.013 3,329.005 ↓ 6,081.0 6,081 1

Nested Loop (cost=3.53..37.89 rows=1 width=362) (actual time=9.307..3,329.005 rows=6,081 loops=1)

  • Join Filter: (findocparmov.cd_tipo_cobranca = tcb.cd_tipo_cobranca)
  • Rows Removed by Join Filter: 66891
64. 10.116 3,276.668 ↓ 6,081.0 6,081 1

Nested Loop (cost=3.53..36.64 rows=1 width=362) (actual time=9.270..3,276.668 rows=6,081 loops=1)

65. 12.307 3,242.228 ↓ 6,081.0 6,081 1

Nested Loop (cost=3.25..36.33 rows=1 width=370) (actual time=9.245..3,242.228 rows=6,081 loops=1)

  • Join Filter: (pesend.seq_endereco = pesendtip.seq_endereco)
  • Rows Removed by Join Filter: 20
66. 9.404 3,187.214 ↓ 6,101.0 6,101 1

Nested Loop (cost=2.82..35.80 rows=1 width=394) (actual time=9.200..3,187.214 rows=6,101 loops=1)

67. 9.248 3,141.324 ↓ 6,081.0 6,081 1

Nested Loop (cost=2.40..35.28 rows=1 width=370) (actual time=9.180..3,141.324 rows=6,081 loops=1)

68. 8.058 3,095.590 ↓ 6,081.0 6,081 1

Nested Loop (cost=1.98..31.47 rows=1 width=318) (actual time=9.157..3,095.590 rows=6,081 loops=1)

69. 123.904 3,069.289 ↓ 6,081.0 6,081 1

Nested Loop (cost=1.84..31.30 rows=1 width=305) (actual time=9.141..3,069.289 rows=6,081 loops=1)

70. 154.491 2,305.101 ↓ 106,714.0 106,714 1

Nested Loop (cost=1.41..30.62 rows=1 width=246) (actual time=0.203..2,305.101 rows=106,714 loops=1)

  • Join Filter: (findocparmov.cd_operacao = opefin.cd_operacao)
71. 168.779 1,830.375 ↓ 106,745.0 106,745 1

Nested Loop (cost=1.27..30.39 rows=1 width=251) (actual time=0.168..1,830.375 rows=106,745 loops=1)

72. 185.826 1,341.361 ↓ 106,745.0 106,745 1

Nested Loop (cost=1.00..22.09 rows=1 width=203) (actual time=0.149..1,341.361 rows=106,745 loops=1)

73. 194.830 194.830 ↓ 106,745.0 106,745 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.093..194.830 rows=106,745 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: 177408
74. 960.705 960.705 ↑ 1.0 1 106,745

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

  • 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. 320.235 320.235 ↑ 1.0 1 106,745

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

  • Index Cond: (cd_operacao = findocparmov.cd_operacao)
76. 320.235 320.235 ↑ 1.0 1 106,745

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

  • 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
77. 640.284 640.284 ↓ 0.0 0 106,714

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

  • 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
78. 18.243 18.243 ↑ 1.0 1 6,081

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

  • Index Cond: (cd_tipo_doc_credito = findoc.cd_tipo_doc_credito)
79. 36.486 36.486 ↑ 1.0 1 6,081

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

  • Index Cond: (cd_pessoa = findoc.cd_pessoa)
80. 36.486 36.486 ↑ 1.0 1 6,081

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

  • Index Cond: (cd_pessoa = pes.cd_pessoa)
81. 42.707 42.707 ↑ 1.0 1 6,101

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.007 rows=1 loops=6,101)

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

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

  • Index Cond: (cd_localidade = pesend.cd_localidade)
  • Heap Fetches: 6081
83. 24.324 24.324 ↓ 1.1 12 6,081

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

84. 72.664 72.972 ↑ 3.1 11 6,081

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

  • 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
85. 0.006 0.308 ↑ 3.1 11 1

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

86. 0.002 0.045 ↓ 0.0 0 1

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

87. 0.001 0.043 ↓ 0.0 0 1

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

88. 0.000 0.042 ↓ 0.0 0 1

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

89. 0.042 0.042 ↓ 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.042..0.042 rows=0 loops=1)

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

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

94. 0.000 0.000 ↓ 0.0 0

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

95. 0.000 0.000 ↓ 0.0 0

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

96. 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)
97. 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
98. 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)
99. 0.000 0.000 ↓ 0.0 0

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

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

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

  • One-Time Filter: false
103. 0.033 0.257 ↑ 2.7 11 1

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

104. 0.048 0.048 ↓ 1.1 11 1

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

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 36
105. 0.027 0.176 ↑ 3.0 1 11

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

106. 0.003 0.149 ↑ 3.0 1 1

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

107. 0.027 0.027 ↑ 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.026..0.027 rows=1 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_filial_todos = 'S'::bpchar)
108. 0.026 0.119 ↑ 3.0 1 1

HashAggregate (cost=27.74..27.77 rows=3 width=112) (actual time=0.118..0.119 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
109. 0.005 0.093 ↑ 3.0 1 1

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

110. 0.000 0.026 ↓ 0.0 0 1

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

111. 0.002 0.026 ↓ 0.0 0 1

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

112. 0.024 0.024 ↓ 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.024..0.024 rows=0 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
113. 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
114. 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)
115. 0.004 0.061 ↑ 1.0 1 1

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

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

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

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

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 27
118. 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
119. 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
120. 54.729 54.729 ↑ 2.0 1 6,081

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

  • Index Cond: ((cd_empresa = 30) AND (cd_base = findocpar.cd_base) AND (seq_processo = findocpar.seq_processo))
  • Heap Fetches: 6081
121. 36.486 36.486 ↓ 0.0 0 6,081

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

  • 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
122. 5.792 5.792 ↓ 0.0 0 5,792

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

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

SubPlan (forNested Loop Left Join)

124. 69.504 69.504 ↑ 1.0 1 5,792

Seq Scan on pessoa_empresa_plano pesemppla (cost=0.00..3.54 rows=1 width=8) (actual time=0.009..0.012 rows=1 loops=5,792)

  • 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
125. 0.000 2,292.836 ↓ 0.0 0 1

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

126. 0.002 2,292.836 ↓ 0.0 0 1

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

127. 0.018 0.148 ↑ 7.0 1 1

HashAggregate (cost=86.84..86.91 rows=7 width=490) (actual time=0.146..0.148 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
128. 0.001 0.130 ↑ 7.0 1 1

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

129. 0.002 0.021 ↓ 0.0 0 1

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

130. 0.000 0.019 ↓ 0.0 0 1

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

131. 0.001 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)

132. 0.018 0.018 ↓ 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.018..0.018 rows=0 loops=1)

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

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

137. 0.000 0.000 ↓ 0.0 0

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

138. 0.000 0.000 ↓ 0.0 0

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

139. 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)
140. 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
141. 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)
142. 0.000 0.000 ↓ 0.0 0

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

143. 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)
144. 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)
145. 0.000 0.000 ↓ 0.0 0

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

  • One-Time Filter: false
146. 0.018 0.108 ↑ 3.0 1 1

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

147. 0.004 0.036 ↑ 1.0 1 1

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

148. 0.010 0.010 ↑ 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.010..0.010 rows=1 loops=1)

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

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

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

HashAggregate (cost=27.74..27.77 rows=3 width=112) (actual time=0.053..0.054 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
151. 0.000 0.039 ↑ 3.0 1 1

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

152. 0.002 0.011 ↓ 0.0 0 1

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

153. 0.000 0.009 ↓ 0.0 0 1

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

154. 0.009 0.009 ↓ 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.009..0.009 rows=0 loops=1)

  • Index Cond: ((seq_operador)::text = '0164'::text)
  • Filter: (id_visao_emp_todos = 'N'::bpchar)
  • Rows Removed by Filter: 1
155. 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
156. 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)
157. 0.003 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)

158. 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)
159. 0.015 0.015 ↑ 1.0 1 1

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

  • Filter: (cd_empresa = 30)
  • Rows Removed by Filter: 27
160. 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
161. 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
162. 0.005 2,292.686 ↓ 0.0 0 1

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

163. 0.002 2,292.681 ↓ 0.0 0 1

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

164. 0.001 2,292.679 ↓ 0.0 0 1

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

165. 0.001 2,292.678 ↓ 0.0 0 1

Nested Loop Left Join (cost=106.33..135.82 rows=1 width=376) (actual time=2,292.678..2,292.678 rows=0 loops=1)

166. 0.001 2,292.677 ↓ 0.0 0 1

Nested Loop (cost=106.18..135.59 rows=1 width=368) (actual time=2,292.677..2,292.677 rows=0 loops=1)

  • Join Filter: (findocparmov_1.cd_filial_mov = pesfil_6.cd_filial)
167. 0.138 2,292.676 ↓ 0.0 0 1

Nested Loop (cost=18.28..46.58 rows=1 width=330) (actual time=2,292.676..2,292.676 rows=0 loops=1)

168. 0.682 2,291.395 ↓ 381.0 381 1

Nested Loop (cost=18.13..46.40 rows=1 width=338) (actual time=726.079..2,291.395 rows=381 loops=1)

169. 0.609 2,288.427 ↓ 381.0 381 1

Nested Loop (cost=17.57..44.95 rows=1 width=362) (actual time=726.057..2,288.427 rows=381 loops=1)

170. 2.076 2,285.532 ↓ 381.0 381 1

Nested Loop (cost=17.01..43.71 rows=1 width=394) (actual time=726.030..2,285.532 rows=381 loops=1)

171. 23.369 2,246.970 ↓ 6,081.0 6,081 1

Nested Loop (cost=16.45..35.11 rows=1 width=362) (actual time=283.909..2,246.970 rows=6,081 loops=1)

  • Join Filter: (findocparmov_1.cd_tipo_cobranca = tcb_1.cd_tipo_cobranca)
  • Rows Removed by Join Filter: 66891
172. 9.596 2,205.358 ↓ 6,081.0 6,081 1

Nested Loop (cost=16.45..33.87 rows=1 width=362) (actual time=283.889..2,205.358 rows=6,081 loops=1)

173. 4.828 2,177.519 ↓ 6,081.0 6,081 1

Nested Loop (cost=16.17..33.55 rows=1 width=370) (actual time=283.851..2,177.519 rows=6,081 loops=1)

  • Join Filter: (pesend_1.seq_endereco = pesendtip_1.seq_endereco)
  • Rows Removed by Join Filter: 20
174. 3.949 2,136.085 ↓ 6,101.0 6,101 1

Nested Loop (cost=15.75..33.03 rows=1 width=394) (actual time=283.829..2,136.085 rows=6,101 loops=1)

175. 6.772 2,101.731 ↓ 6,081.0 6,081 1

Nested Loop (cost=15.33..32.50 rows=1 width=370) (actual time=283.815..2,101.731 rows=6,081 loops=1)

176. 4.522 2,076.716 ↓ 6,081.0 6,081 1

Nested Loop (cost=15.05..32.02 rows=1 width=338) (actual time=283.802..2,076.716 rows=6,081 loops=1)

177. 9.146 2,041.789 ↓ 6,081.0 6,081 1

Nested Loop (cost=14.63..28.21 rows=1 width=286) (actual time=283.787..2,041.789 rows=6,081 loops=1)

178. 29.874 2,020.481 ↓ 6,081.0 6,081 1

Nested Loop (cost=14.49..28.04 rows=1 width=273) (actual time=283.776..2,020.481 rows=6,081 loops=1)

179. 122.124 1,350.323 ↓ 106,714.0 106,714 1

Nested Loop (cost=14.06..27.36 rows=1 width=214) (actual time=283.611..1,350.323 rows=106,714 loops=1)

180. 90.880 374.487 ↓ 106,714.0 106,714 1

Hash Join (cost=13.51..18.77 rows=1 width=150) (actual time=283.551..374.487 rows=106,714 loops=1)

  • Hash Cond: (opefin_1.cd_operacao = findocparmov_1.cd_operacao)
181. 0.114 0.114 ↓ 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.114 rows=216 loops=1)

  • Filter: ((id_tipo_operacao)::text <> 'EP'::text)
  • Rows Removed by Filter: 3
182. 95.923 283.493 ↓ 106,745.0 106,745 1

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

  • Buckets: 131072 (originally 1024) Batches: 1 (originally 1) Memory Usage: 20201kB
183. 187.570 187.570 ↓ 106,745.0 106,745 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.038..187.570 rows=106,745 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: 177408
184. 853.712 853.712 ↑ 1.0 1 106,714

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

  • 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[]))
185. 640.284 640.284 ↓ 0.0 0 106,714

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

  • 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
186. 12.162 12.162 ↑ 1.0 1 6,081

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.002 rows=1 loops=6,081)

  • Index Cond: (cd_tipo_doc_credito = findoc_1.cd_tipo_doc_credito)
187. 30.405 30.405 ↑ 1.0 1 6,081

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

  • Index Cond: (cd_pessoa = findoc_1.cd_pessoa)
188. 18.243 18.243 ↑ 1.0 1 6,081

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

  • Index Cond: (cd_operacao = opefin_1.cd_operacao)
189. 30.405 30.405 ↑ 1.0 1 6,081

Index Scan using pessoa_endereco_pk on pessoa_endereco pesend_1 (cost=0.42..0.52 rows=1 width=24) (actual time=0.004..0.005 rows=1 loops=6,081)

  • Index Cond: (cd_pessoa = pes_1.cd_pessoa)
190. 36.606 36.606 ↑ 1.0 1 6,101

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.005..0.006 rows=1 loops=6,101)

  • Index Cond: ((cd_pessoa = pes_1.cd_pessoa) AND ((id_tipo_endereco)::text = 'PRI'::text))
191. 18.243 18.243 ↑ 1.0 1 6,081

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

  • Index Cond: (cd_localidade = pesend_1.cd_localidade)
  • Heap Fetches: 6081
192. 18.243 18.243 ↓ 1.1 12 6,081

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

193. 36.486 36.486 ↓ 0.0 0 6,081

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

  • 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))
194. 2.286 2.286 ↑ 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.006 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
195. 2.286 2.286 ↑ 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.006..0.006 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))
196. 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
197. 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
198. 0.000 0.000 ↓ 0.0 0

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

199. 0.000 0.000 ↓ 0.0 0

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

200. 0.000 0.000 ↓ 0.0 0

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

201. 0.000 0.000 ↓ 0.0 0

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

202. 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)
203. 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
204. 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))
205. 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
206. 0.000 0.000 ↓ 0.0 0

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

207. 0.000 0.000 ↓ 0.0 0

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

208. 0.000 0.000 ↓ 0.0 0

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

209. 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)
210. 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
211. 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)
212. 0.000 0.000 ↓ 0.0 0

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

213. 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)
214. 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)
215. 0.000 0.000 ↓ 0.0 0

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

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

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

217. 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)
218. 0.000 0.000 ↓ 0.0 0

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

219. 0.000 0.000 ↓ 0.0 0

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

220. 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)
221. 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
222. 0.000 0.000 ↓ 0.0 0

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

223. 0.000 0.000 ↓ 0.0 0

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

224. 0.000 0.000 ↓ 0.0 0

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

225. 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)
226. 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
227. 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)
228. 0.000 0.000 ↓ 0.0 0

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

229. 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)
230. 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)
231. 0.000 0.000 ↓ 0.0 0

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

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

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

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

Index Scan using pessoa_associado_idx1 on pessoa_associado pesass_1 (cost=0.15..0.22 rows=1 width=16) (never executed)

  • Index Cond: (cd_pessoa = pes_1.cd_pessoa)
  • Filter: (dt_demissao IS NULL)
234. 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
235. 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
236. 0.000 0.000 ↓ 0.0 0

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

237. 0.000 0.000 ↓ 0.0 0

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

238. 0.000 0.000 ↓ 0.0 0

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

239. 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)
240. 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
241. 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)
242. 0.000 0.000 ↓ 0.0 0

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

243. 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)
244. 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)
245. 0.000 0.000 ↓ 0.0 0

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

  • One-Time Filter: false
246.          

SubPlan (forNested Loop)

247. 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))