explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qi3T

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Subquery Scan on origem (cost=22,229.20..15,790,309.93 rows=70,474 width=14) (actual rows= loops=)

  • Filter: ((origem.cppinfocomplementar)::text <> ((origem.informacao_complementar_consistencia)::character varying)::text)
2. 0.000 0.000 ↓ 0.0

Hash Join (cost=22,229.20..15,789,070.44 rows=70,828 width=44) (actual rows= loops=)

  • Hash Cond: ((tblancamentodetalhamento.ctlsequencia = tblancamento.ctlsequencia) AND (tblancamentodetalhamento.lansequencia = tblancamento.lansequencia))
3. 0.000 0.000 ↓ 0.0

Seq Scan on tblancamentodetalhamento (cost=0.00..45,390.66 rows=109,073 width=24) (actual rows= loops=)

  • Filter: ((clicodigo = 2,386) AND (loaano = 2,020) AND (ldttipo = 2) AND (cppidinfocomplementar = 6))
4. 0.000 0.000 ↓ 0.0

Hash (cost=14,064.32..14,064.32 rows=544,325 width=18) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tblancamento on tblancamento (cost=0.56..14,064.32 rows=544,325 width=18) (actual rows= loops=)

  • Index Cond: ((clicodigo = 2,386) AND (loaano = 2,020))
6.          

SubPlan (for Hash Join)

7. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=219.43..221.96 rows=1 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Subquery Scan on origem_formatacao (cost=219.14..219.44 rows=1 width=40) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

GroupAggregate (cost=219.14..219.17 rows=1 width=44) (actual rows= loops=)

  • Group Key: origem_formatacao_1.clicodigo, origem_formatacao_1.clicodigopln, origem_formatacao_1.loaano, origem_formatacao_1.plntipoplano
10. 0.000 0.000 ↓ 0.0

Sort (cost=219.14..219.15 rows=1 width=24) (actual rows= loops=)

  • Sort Key: origem_formatacao_1.clicodigo, origem_formatacao_1.clicodigopln, origem_formatacao_1.loaano, origem_formatacao_1.plntipoplano
11. 0.000 0.000 ↓ 0.0

Subquery Scan on origem_formatacao_1 (cost=219.12..219.13 rows=1 width=24) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Limit (cost=219.12..219.12 rows=1 width=28) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Sort (cost=219.12..219.13 rows=3 width=28) (actual rows= loops=)

  • Sort Key: (0)
14. 0.000 0.000 ↓ 0.0

Append (cost=0.85..219.11 rows=3 width=28) (actual rows= loops=)

15. 0.000 0.000 ↓ 0.0

Limit (cost=0.85..5.33 rows=1 width=38) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..5.33 rows=1 width=38) (actual rows= loops=)

17. 0.000 0.000 ↓ 0.0

Index Scan using idx_lancamentodet_lancamento on tblancamentodetalhamento tblancamentodetalhamento_1 (cost=0.43..2.66 rows=1 width=34) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia) AND (lansequencia = tblancamento.lansequencia))
  • Filter: (ldttipo = 1)
18. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbplano on tbplano (cost=0.42..1.54 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigopln = tblancamentodetalhamento_1.clicodigopln) AND (loaano = tblancamentodetalhamento_1.loaanodesp) AND (plntipoplano = tblancamentodetalhamento_1.plntipoplanodesp) AND (plncodigo = tblancamentodetalhamento_1.plncodigodesp))
19. 0.000 0.000 ↓ 0.0

Limit (cost=77.61..77.64 rows=1 width=24) (actual rows= loops=)

20. 0.000 0.000 ↓ 0.0

Subquery Scan on origem_informacao_complementar (cost=77.61..77.64 rows=1 width=24) (actual rows= loops=)

21. 0.000 0.000 ↓ 0.0

Group (cost=77.61..77.63 rows=1 width=20) (actual rows= loops=)

  • Group Key: tbempenho.clicodigo, tbempenho.clicodigopln, tbempenho.loaano, tbempenho.plntipoplano, tbempenho.plncodigo
22. 0.000 0.000 ↓ 0.0

Sort (cost=77.61..77.61 rows=1 width=20) (actual rows= loops=)

  • Sort Key: tbempenho.clicodigo, tbempenho.clicodigopln, tbempenho.loaano, tbempenho.plntipoplano, tbempenho.plncodigo
23. 0.000 0.000 ↓ 0.0

Nested Loop (cost=51.35..77.60 rows=1 width=20) (actual rows= loops=)

24. 0.000 0.000 ↓ 0.0

HashAggregate (cost=50.92..51.02 rows=10 width=12) (actual rows= loops=)

  • Group Key: tbempenho_1.clicodigo, tbempenho_1.loaano, tbempenho_1.empnro, tbempenho_1.empsub
25. 0.000 0.000 ↓ 0.0

Append (cost=0.85..50.82 rows=10 width=12) (actual rows= loops=)

26. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..5.30 rows=1 width=12) (actual rows= loops=)

27. 0.000 0.000 ↓ 0.0

Index Scan using idx_lancamentodet_lancamento on tblancamentodetalhamento tblancamentodetalhamento_2 (cost=0.43..2.66 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia) AND (lansequencia = tblancamento.lansequencia))
  • Filter: (ldttipo = 1)
28. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_1 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamentodetalhamento_2.loaanoemp) AND (empnro = tblancamentodetalhamento_2.empnro) AND (empsub = tblancamentodetalhamento_2.empsub))
29. 0.000 0.000 ↓ 0.0

Index Scan using idx_empenho_controleseq on tbempenho tbempenho_2 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
30. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..5.16 rows=1 width=12) (actual rows= loops=)

31. 0.000 0.000 ↓ 0.0

Index Scan using idx_empenhoest_controleseq on tbempenhoest (cost=0.29..2.51 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
32. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_3 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbempenhoest.loaanoemp) AND (empnro = tbempenhoest.empnro) AND (empsub = tbempenhoest.empsub))
33. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..5.29 rows=1 width=12) (actual rows= loops=)

34. 0.000 0.000 ↓ 0.0

Index Scan using idx_liquidacao_controleseq on tbliquidacao (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
35. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_4 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbliquidacao.loaanoemp) AND (empnro = tbliquidacao.empnro) AND (empsub = tbliquidacao.empsub))
36. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..5.61 rows=1 width=12) (actual rows= loops=)

37. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..5.16 rows=1 width=12) (actual rows= loops=)

38. 0.000 0.000 ↓ 0.0

Index Scan using idx_liquidacaoest_controleseq on tbliquidacaoest (cost=0.29..2.51 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
39. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbliquidacao on tbliquidacao tbliquidacao_1 (cost=0.42..2.65 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbliquidacaoest.loaanoliq) AND (liqtipo = tbliquidacaoest.liqtipo) AND (liqsequencia = tbliquidacaoest.liqsequencia))
40. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_5 (cost=0.42..0.46 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbliquidacao_1.loaanoemp) AND (empnro = tbliquidacao_1.empnro) AND (empsub = tbliquidacao_1.empsub))
41. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.27..5.75 rows=1 width=12) (actual rows= loops=)

42. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..5.30 rows=1 width=12) (actual rows= loops=)

43. 0.000 0.000 ↓ 0.0

Index Scan using idx_pagamento_controleseq on tbpagamento (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
44. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbliquidacao on tbliquidacao tbliquidacao_2 (cost=0.42..2.65 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbpagamento.loaanoliq) AND (liqtipo = tbpagamento.liqtipo) AND (liqsequencia = tbpagamento.liqsequencia))
45. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_6 (cost=0.42..0.46 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbliquidacao_2.loaanoemp) AND (empnro = tbliquidacao_2.empnro) AND (empsub = tbliquidacao_2.empsub))
46. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.55..6.14 rows=1 width=12) (actual rows= loops=)

47. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..5.68 rows=1 width=12) (actual rows= loops=)

48. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..5.16 rows=1 width=12) (actual rows= loops=)

49. 0.000 0.000 ↓ 0.0

Index Scan using idx_pagamentoest_controleseq on tbpagamentoest (cost=0.29..2.51 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
50. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbpagamento on tbpagamento tbpagamento_1 (cost=0.42..2.65 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbpagamentoest.loaanopag) AND (pagtipoemp = tbpagamentoest.pagtipoemp) AND (pagnumero = tbpagamentoest.pagnumero))
51. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbliquidacao on tbliquidacao tbliquidacao_3 (cost=0.42..0.52 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbpagamento_1.loaanoliq) AND (liqtipo = tbpagamento_1.liqtipo) AND (liqsequencia = tbpagamento_1.liqsequencia))
52. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_7 (cost=0.42..0.46 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbliquidacao_3.loaanoemp) AND (empnro = tbliquidacao_3.empnro) AND (empsub = tbliquidacao_3.empsub))
53. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..5.02 rows=1 width=12) (actual rows= loops=)

54. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbemliquidacao on tbemliquidacao (cost=0.15..2.37 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano))
  • Filter: (ctlsequencia = tblancamento.ctlsequencia)
55. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_8 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbemliquidacao.loaanoemp) AND (empnro = tbemliquidacao.empnro) AND (empsub = tbemliquidacao.empsub))
56. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.72..5.25 rows=1 width=12) (actual rows= loops=)

  • Join Filter: ((tbemliquidacaoest.loaanoeml = tbemliquidacao_1.loaano) AND (tbemliquidacaoest.loaanoemp = tbemliquidacao_1.loaanoemp) AND (tbemliquidacaoest.empnro = tbemliquidacao_1.empnro) AND (tbemliquidacaoest.empsub = tbemliquidacao_1.empsub) AND (tbemliquidacaoest.emlsequencia = tbemliquidacao_1.emlsequencia))
57. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..5.02 rows=1 width=28) (actual rows= loops=)

58. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbemliquidacaoest on tbemliquidacaoest (cost=0.15..2.37 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano))
  • Filter: (ctlsequencia = tblancamento.ctlsequencia)
59. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_9 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbemliquidacaoest.loaanoemp) AND (empnro = tbemliquidacaoest.empnro) AND (empsub = tbemliquidacaoest.empsub))
60. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbemliquidacao on tbemliquidacao tbemliquidacao_1 (cost=0.15..0.21 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaanoemp = tbempenho_9.loaano) AND (empnro = tbempenho_9.empnro) AND (empsub = tbempenho_9.empsub))
61. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.99..4.50 rows=1 width=12) (actual rows= loops=)

62. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.56..3.92 rows=1 width=20) (actual rows= loops=)

63. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbempenhoreversao on tbempenhoreversao (cost=0.15..2.37 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano))
  • Filter: (ctlsequencia = tblancamento.ctlsequencia)
64. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenhoest on tbempenhoest tbempenhoest_1 (cost=0.41..1.55 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbempenhoreversao.loaanoest) AND (empnro = tbempenhoreversao.empnro) AND (empsub = tbempenhoreversao.empsub) AND (estsequencia = tbempenhoreversao.estsequencia) AND (loaanoemp = tbempenhoreversao.loaanoemp))
65. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_10 (cost=0.42..0.58 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbempenhoest_1.loaanoemp) AND (empnro = tbempenhoest_1.empnro) AND (empsub = tbempenhoest_1.empsub))
66. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbempenho on tbempenho (cost=0.42..2.65 rows=1 width=26) (actual rows= loops=)

  • Index Cond: ((clicodigo = tbempenho_1.clicodigo) AND (loaano = tbempenho_1.loaano) AND (empnro = tbempenho_1.empnro) AND (empsub = tbempenho_1.empsub))
67. 0.000 0.000 ↓ 0.0

Limit (cost=136.07..136.10 rows=1 width=23) (actual rows= loops=)

68. 0.000 0.000 ↓ 0.0

Subquery Scan on origem_informacao_complementar_1 (cost=136.07..136.15 rows=3 width=23) (actual rows= loops=)

69. 0.000 0.000 ↓ 0.0

Group (cost=136.07..136.12 rows=3 width=19) (actual rows= loops=)

  • Group Key: tbdotacao.clicodigo, tbdotacao.clicodigopln, tbdotacao.loaano, tbdotacao.plntipoplano, tbdotacao.plncodigo
70. 0.000 0.000 ↓ 0.0

Sort (cost=136.07..136.08 rows=3 width=19) (actual rows= loops=)

  • Sort Key: tbdotacao.clicodigo, tbdotacao.clicodigopln, tbdotacao.loaano, tbdotacao.plntipoplano, tbdotacao.plncodigo
71. 0.000 0.000 ↓ 0.0

Nested Loop (cost=116.12..136.05 rows=3 width=19) (actual rows= loops=)

72. 0.000 0.000 ↓ 0.0

HashAggregate (cost=115.83..115.91 rows=8 width=6) (actual rows= loops=)

  • Group Key: tbdotacao_1.loaano, tbdotacao_1.dotcodigo
73. 0.000 0.000 ↓ 0.0

Append (cost=0.71..115.79 rows=8 width=6) (actual rows= loops=)

74. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..5.18 rows=1 width=6) (actual rows= loops=)

75. 0.000 0.000 ↓ 0.0

Index Scan using idx_lancamentodet_lancamento on tblancamentodetalhamento tblancamentodetalhamento_3 (cost=0.43..2.66 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia) AND (lansequencia = tblancamento.lansequencia))
  • Filter: (ldttipo = 1)
76. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbdotacao on tbdotacao tbdotacao_1 (cost=0.29..1.41 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((loaano = tblancamentodetalhamento_3.loaanodot) AND (dotcodigo = tblancamentodetalhamento_3.dotcodigo))
77. 0.000 0.000 ↓ 0.0

Index Scan using idx_tbdotacao_controleseq on tbdotacao tbdotacao_2 (cost=0.29..2.51 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
78. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..5.29 rows=1 width=6) (actual rows= loops=)

79. 0.000 0.000 ↓ 0.0

Index Scan using idx_movreserva_controleseq on tbmovreserva (cost=0.42..2.65 rows=1 width=10) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
80. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbreserva on tbreserva (cost=0.42..2.64 rows=1 width=14) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (rescodigo = tbmovreserva.rescodigo))
81. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..3.92 rows=1 width=6) (actual rows= loops=)

82. 0.000 0.000 ↓ 0.0

Index Scan using idx_tbaltfinloa_controleseq on tbaltfinloa (cost=0.29..2.51 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
83. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbdotacao on tbdotacao tbdotacao_3 (cost=0.29..1.41 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((loaano = tblancamento.loaano) AND (dotcodigo = tbaltfinloa.dotcodigo))
84. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.72..5.40 rows=1 width=6) (actual rows= loops=)

85. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.44..4.90 rows=1 width=6) (actual rows= loops=)

86. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbrevisaoaltfinloa on tbrevisaoaltfinloa (cost=0.15..2.38 rows=1 width=14) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano))
  • Filter: (ctlsequencia = tblancamento.ctlsequencia)
87. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbaltfinloa on tbaltfinloa tbaltfinloa_1 (cost=0.29..2.51 rows=1 width=18) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (alonumero = tbrevisaoaltfinloa.alonumero) AND (faolote = tbrevisaoaltfinloa.faolote) AND (faosequencia = tbrevisaoaltfinloa.faosequencia))
88. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbdotacao on tbdotacao tbdotacao_4 (cost=0.29..0.50 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((loaano = tblancamento.loaano) AND (dotcodigo = tbaltfinloa_1.dotcodigo))
89. 0.000 0.000 ↓ 0.0

Nested Loop (cost=51.63..77.91 rows=1 width=6) (actual rows= loops=)

90. 0.000 0.000 ↓ 0.0

Nested Loop (cost=51.35..77.60 rows=1 width=8) (actual rows= loops=)

91. 0.000 0.000 ↓ 0.0

HashAggregate (cost=50.92..51.02 rows=10 width=12) (actual rows= loops=)

  • Group Key: tbempenho_12.clicodigo, tbempenho_12.loaano, tbempenho_12.empnro, tbempenho_12.empsub
92. 0.000 0.000 ↓ 0.0

Append (cost=0.85..50.82 rows=10 width=12) (actual rows= loops=)

93. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..5.30 rows=1 width=12) (actual rows= loops=)

94. 0.000 0.000 ↓ 0.0

Index Scan using idx_lancamentodet_lancamento on tblancamentodetalhamento tblancamentodetalhamento_4 (cost=0.43..2.66 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia) AND (lansequencia = tblancamento.lansequencia))
  • Filter: (ldttipo = 1)
95. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_12 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamentodetalhamento_4.loaanoemp) AND (empnro = tblancamentodetalhamento_4.empnro) AND (empsub = tblancamentodetalhamento_4.empsub))
96. 0.000 0.000 ↓ 0.0

Index Scan using idx_empenho_controleseq on tbempenho tbempenho_13 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
97. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..5.16 rows=1 width=12) (actual rows= loops=)

98. 0.000 0.000 ↓ 0.0

Index Scan using idx_empenhoest_controleseq on tbempenhoest tbempenhoest_2 (cost=0.29..2.51 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
99. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_14 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbempenhoest_2.loaanoemp) AND (empnro = tbempenhoest_2.empnro) AND (empsub = tbempenhoest_2.empsub))
100. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.84..5.29 rows=1 width=12) (actual rows= loops=)

101. 0.000 0.000 ↓ 0.0

Index Scan using idx_liquidacao_controleseq on tbliquidacao tbliquidacao_4 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
102. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_15 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbliquidacao_4.loaanoemp) AND (empnro = tbliquidacao_4.empnro) AND (empsub = tbliquidacao_4.empsub))
103. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..5.61 rows=1 width=12) (actual rows= loops=)

104. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..5.16 rows=1 width=12) (actual rows= loops=)

105. 0.000 0.000 ↓ 0.0

Index Scan using idx_liquidacaoest_controleseq on tbliquidacaoest tbliquidacaoest_1 (cost=0.29..2.51 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
106. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbliquidacao on tbliquidacao tbliquidacao_5 (cost=0.42..2.65 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbliquidacaoest_1.loaanoliq) AND (liqtipo = tbliquidacaoest_1.liqtipo) AND (liqsequencia = tbliquidacaoest_1.liqsequencia))
107. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_16 (cost=0.42..0.46 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbliquidacao_5.loaanoemp) AND (empnro = tbliquidacao_5.empnro) AND (empsub = tbliquidacao_5.empsub))
108. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.27..5.75 rows=1 width=12) (actual rows= loops=)

109. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.85..5.30 rows=1 width=12) (actual rows= loops=)

110. 0.000 0.000 ↓ 0.0

Index Scan using idx_pagamento_controleseq on tbpagamento tbpagamento_2 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
111. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbliquidacao on tbliquidacao tbliquidacao_6 (cost=0.42..2.65 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbpagamento_2.loaanoliq) AND (liqtipo = tbpagamento_2.liqtipo) AND (liqsequencia = tbpagamento_2.liqsequencia))
112. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_17 (cost=0.42..0.46 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbliquidacao_6.loaanoemp) AND (empnro = tbliquidacao_6.empnro) AND (empsub = tbliquidacao_6.empsub))
113. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.55..6.14 rows=1 width=12) (actual rows= loops=)

114. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.13..5.68 rows=1 width=12) (actual rows= loops=)

115. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..5.16 rows=1 width=12) (actual rows= loops=)

116. 0.000 0.000 ↓ 0.0

Index Scan using idx_pagamentoest_controleseq on tbpagamentoest tbpagamentoest_1 (cost=0.29..2.51 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano) AND (ctlsequencia = tblancamento.ctlsequencia))
117. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbpagamento on tbpagamento tbpagamento_3 (cost=0.42..2.65 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbpagamentoest_1.loaanopag) AND (pagtipoemp = tbpagamentoest_1.pagtipoemp) AND (pagnumero = tbpagamentoest_1.pagnumero))
118. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbliquidacao on tbliquidacao tbliquidacao_7 (cost=0.42..0.52 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbpagamento_3.loaanoliq) AND (liqtipo = tbpagamento_3.liqtipo) AND (liqsequencia = tbpagamento_3.liqsequencia))
119. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_18 (cost=0.42..0.46 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbliquidacao_7.loaanoemp) AND (empnro = tbliquidacao_7.empnro) AND (empsub = tbliquidacao_7.empsub))
120. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..5.02 rows=1 width=12) (actual rows= loops=)

121. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbemliquidacao on tbemliquidacao tbemliquidacao_2 (cost=0.15..2.37 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano))
  • Filter: (ctlsequencia = tblancamento.ctlsequencia)
122. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_19 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbemliquidacao_2.loaanoemp) AND (empnro = tbemliquidacao_2.empnro) AND (empsub = tbemliquidacao_2.empsub))
123. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.72..5.25 rows=1 width=12) (actual rows= loops=)

  • Join Filter: ((tbemliquidacaoest_1.loaanoeml = tbemliquidacao_3.loaano) AND (tbemliquidacaoest_1.loaanoemp = tbemliquidacao_3.loaanoemp) AND (tbemliquidacaoest_1.empnro = tbemliquidacao_3.empnro) AND (tbemliquidacaoest_1.empsub = tbemliquidacao_3.empsub) AND (tbemliquidacaoest_1.emlsequencia = tbemliquidacao_3.emlsequencia))
124. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.57..5.02 rows=1 width=28) (actual rows= loops=)

125. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbemliquidacaoest on tbemliquidacaoest tbemliquidacaoest_1 (cost=0.15..2.37 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano))
  • Filter: (ctlsequencia = tblancamento.ctlsequencia)
126. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_20 (cost=0.42..2.65 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbemliquidacaoest_1.loaanoemp) AND (empnro = tbemliquidacaoest_1.empnro) AND (empsub = tbemliquidacaoest_1.empsub))
127. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbemliquidacao on tbemliquidacao tbemliquidacao_3 (cost=0.15..0.21 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaanoemp = tbempenho_20.loaano) AND (empnro = tbempenho_20.empnro) AND (empsub = tbempenho_20.empsub))
128. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.99..4.50 rows=1 width=12) (actual rows= loops=)

129. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.56..3.92 rows=1 width=20) (actual rows= loops=)

130. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbempenhoreversao on tbempenhoreversao tbempenhoreversao_1 (cost=0.15..2.37 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tblancamento.loaano))
  • Filter: (ctlsequencia = tblancamento.ctlsequencia)
131. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenhoest on tbempenhoest tbempenhoest_3 (cost=0.41..1.55 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbempenhoreversao_1.loaanoest) AND (empnro = tbempenhoreversao_1.empnro) AND (empsub = tbempenhoreversao_1.empsub) AND (estsequencia = tbempenhoreversao_1.estsequencia) AND (loaanoemp = tbempenhoreversao_1.loaanoemp))
132. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbempenho on tbempenho tbempenho_21 (cost=0.42..0.58 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaano = tbempenhoest_3.loaanoemp) AND (empnro = tbempenhoest_3.empnro) AND (empsub = tbempenhoest_3.empsub))
133. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbempenho on tbempenho tbempenho_11 (cost=0.42..2.65 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigo = tbempenho_12.clicodigo) AND (loaano = tbempenho_12.loaano) AND (empnro = tbempenho_12.empnro) AND (empsub = tbempenho_12.empsub))
134. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbdotacao on tbdotacao tbdotacao_5 (cost=0.29..0.31 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((loaano = tbempenho_11.loaano) AND (dotcodigo = tbempenho_11.dotcodigo))
135. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.00..7.63 rows=1 width=6) (actual rows= loops=)

136. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.58..4.99 rows=1 width=14) (actual rows= loops=)

  • Join Filter: ((tbinscricaocons.connumero = tbmovconsorcio.connumero) AND (tbinscricaocons.loaano = tbmovconsorcio.loaanoinsc) AND (tbinscricaocons.lcosequencia = tbmovconsorcio.lcosequencia) AND (tbinscricaocons.dotcodigo = tbmovconsorcio.dotcodigo))
137. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..4.80 rows=1 width=34) (actual rows= loops=)

138. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.15..3.39 rows=1 width=28) (actual rows= loops=)

139. 0.000 0.000 ↓ 0.0

Seq Scan on tbconsorcio (cost=0.00..1.01 rows=1 width=16) (actual rows= loops=)

  • Filter: (clicodigo = tblancamento.clicodigo)
140. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbinscricaocons on tbinscricaocons (cost=0.15..2.37 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (connumero = tbconsorcio.connumero))
141. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbdotacao on tbdotacao tbdotacao_6 (cost=0.29..1.41 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((loaano = tbinscricaocons.loaano) AND (dotcodigo = tbinscricaocons.dotcodigo))
142. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbmovconsorcio on tbmovconsorcio (cost=0.15..0.18 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaanoinsc = tbdotacao_6.loaano) AND (dotcodigo = tbdotacao_6.dotcodigo) AND (loaanomov = tblancamento.loaano))
  • Filter: (ctlsequencia = tblancamento.ctlsequencia)
143. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbunico on tbunico (cost=0.42..2.64 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (unicodigo = tbconsorcio.unicodigo)
144. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1.15..7.83 rows=1 width=6) (actual rows= loops=)

145. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.73..5.19 rows=1 width=14) (actual rows= loops=)

  • Join Filter: ((tbmovconsorcio_1.loaanoinsc = tbmovconsorcioest.loaanoinsc) AND (tbmovconsorcio_1.connumero = tbmovconsorcioest.connumero) AND (tbmovconsorcio_1.dotcodigo = tbmovconsorcioest.dotcodigo) AND (tbmovconsorcio_1.loaanomov = tbmovconsorcioest.loaanomov) AND (tbmovconsorcio_1.movsequencia = tbmovconsorcioest.movsequencia) AND (tbmovconsorcio_1.lcosequencia = tbmovconsorcioest.lcosequencia))
146. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.58..4.99 rows=1 width=50) (actual rows= loops=)

  • Join Filter: ((tbinscricaocons_1.loaano = tbmovconsorcio_1.loaanoinsc) AND (tbinscricaocons_1.connumero = tbmovconsorcio_1.connumero) AND (tbinscricaocons_1.dotcodigo = tbmovconsorcio_1.dotcodigo) AND (tbinscricaocons_1.lcosequencia = tbmovconsorcio_1.lcosequencia))
147. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.43..4.80 rows=1 width=34) (actual rows= loops=)

148. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.15..3.39 rows=1 width=28) (actual rows= loops=)

149. 0.000 0.000 ↓ 0.0

Seq Scan on tbconsorcio tbconsorcio_1 (cost=0.00..1.01 rows=1 width=16) (actual rows= loops=)

  • Filter: (clicodigo = tblancamento.clicodigo)
150. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbinscricaocons on tbinscricaocons tbinscricaocons_1 (cost=0.15..2.37 rows=1 width=16) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (connumero = tbconsorcio_1.connumero))
151. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbdotacao on tbdotacao tbdotacao_7 (cost=0.29..1.41 rows=1 width=6) (actual rows= loops=)

  • Index Cond: ((loaano = tbinscricaocons_1.loaano) AND (dotcodigo = tbinscricaocons_1.dotcodigo))
152. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbmovconsorcio on tbmovconsorcio tbmovconsorcio_1 (cost=0.15..0.17 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaanoinsc = tbdotacao_7.loaano) AND (dotcodigo = tbdotacao_7.dotcodigo))
153. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbmovconsorcioest on tbmovconsorcioest (cost=0.15..0.18 rows=1 width=20) (actual rows= loops=)

  • Index Cond: ((clicodigo = tblancamento.clicodigo) AND (loaanoinsc = tbdotacao_7.loaano) AND (dotcodigo = tbdotacao_7.dotcodigo) AND (loaanoest = tblancamento.loaano))
  • Filter: (ctlsequencia = tblancamento.ctlsequencia)
154. 0.000 0.000 ↓ 0.0

Index Only Scan using pk_tbunico on tbunico tbunico_1 (cost=0.42..2.64 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (unicodigo = tbconsorcio_1.unicodigo)
155. 0.000 0.000 ↓ 0.0

Index Scan using pk_tbdotacao on tbdotacao (cost=0.29..2.51 rows=1 width=23) (actual rows= loops=)

  • Index Cond: ((loaano = tbdotacao_1.loaano) AND (dotcodigo = tbdotacao_1.dotcodigo))
156. 0.000 0.000 ↓ 0.0

Index Scan using idx_unique_siconfiplano_plano on tbsiconfiplano (cost=0.28..2.51 rows=1 width=24) (actual rows= loops=)

  • Index Cond: ((clicodigopln = origem_formatacao.clicodigopln) AND (loaano = ('2020'::smallint)) AND (plntipoplano = origem_formatacao.plntipoplano) AND (plncodigo = (CASE WHEN (origem_formatacao.loaano <> 2020) THEN COALESCE(wcp.fn_get_plano_destino((origem_formatacao.loaano)::integer, 2020, (origem_formatacao.clicodigopln)::bigint, origem_formatacao.plntipoplano, origem_formatacao.plncodigo, (origem_formatacao.clicodigo)::bigint), origem_formatacao.plncodigo) ELSE origem_formatacao.plncodigo END)))