explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JTH6

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 34.793 ↑ 2.0 2 1

Limit (cost=10,072.95..10,072.96 rows=4 width=3,051) (actual time=34.792..34.793 rows=2 loops=1)

2. 0.018 34.790 ↑ 2.0 2 1

Sort (cost=10,072.95..10,072.96 rows=4 width=3,051) (actual time=34.790..34.790 rows=2 loops=1)

  • Sort Key: (COALESCE(round(((sum(produtosinterno.valorprodutoconvenio) - sum(produtosinterno.valorprodutoprestador))), 4), '0'::numeric))
  • Sort Method: quicksort Memory: 29kB
3. 0.049 34.772 ↑ 2.0 2 1

WindowAgg (cost=9,685.96..10,072.87 rows=4 width=3,051) (actual time=34.766..34.772 rows=2 loops=1)

4. 0.284 34.723 ↑ 2.0 2 1

Hash Right Join (cost=9,685.96..10,072.54 rows=4 width=2,649) (actual time=34.684..34.723 rows=2 loops=1)

  • Hash Cond: (operadora_multitenant_cobrancaoriginal.id = operadoraoriginalcobrancaoriginal.id_multitenant)
5.          

Initplan (forHash Right Join)

6. 0.021 0.021 ↑ 1.0 1 1

Seq Scan on fibocamposconfig (cost=0.00..4.38 rows=1 width=1) (actual time=0.009..0.021 rows=1 loops=1)

  • Filter: ((cc_tipo = 'HOSPITAL'::text) AND (ccnome = 'permitirAceiteComProdutoRecursado'::text))
  • Rows Removed by Filter: 91
7. 6.635 6.635 ↑ 8.1 105 1

Foreign Scan on operadora_multitenant operadora_multitenant_cobrancaoriginal (cost=100.00..135.59 rows=853 width=72) (actual time=5.025..6.635 rows=105 loops=1)

8. 0.012 27.623 ↓ 2.0 2 1

Hash (cost=9,581.57..9,581.57 rows=1 width=1,949) (actual time=27.623..27.623 rows=2 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
9. 0.003 27.611 ↓ 2.0 2 1

Nested Loop Left Join (cost=9,571.70..9,581.57 rows=1 width=1,949) (actual time=27.479..27.611 rows=2 loops=1)

10. 0.011 27.604 ↓ 2.0 2 1

Nested Loop Left Join (cost=9,571.55..9,581.39 rows=1 width=1,909) (actual time=27.473..27.604 rows=2 loops=1)

  • Join Filter: (CASE WHEN ((sincronia_recursos_aceites_erp.recebimento_id IS NOT NULL) AND (recebimento.id IS NOT NULL)) THEN (sincronia_recursos_aceites_erp.recebimento_id = recebimento.id) ELSE true END AND (remessa.rem_numero = sincronia_recursos_aceites_erp.remessa))
11. 0.004 27.575 ↓ 2.0 2 1

Nested Loop Left Join (cost=9,571.26..9,581.06 rows=1 width=1,874) (actual time=27.456..27.575 rows=2 loops=1)

12. 0.053 27.571 ↓ 2.0 2 1

Nested Loop Left Join (cost=9,570.97..9,580.74 rows=1 width=1,804) (actual time=27.453..27.571 rows=2 loops=1)

  • Filter: (COALESCE(operadoraoriginalprestador.operadora_id, operadoraoriginalcobrancaoriginal.id, operadoraoriginalconvenio.id, operadoraoriginalconvenio_temp.id, '0'::bigint) = '36896823'::bigint)
  • Rows Removed by Filter: 72
13. 0.066 27.518 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,570.83..9,580.57 rows=1 width=1,788) (actual time=23.710..27.518 rows=74 loops=1)

14. 0.069 27.452 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,570.40..9,580.09 rows=1 width=1,771) (actual time=23.708..27.452 rows=74 loops=1)

15. 0.068 27.383 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,570.11..9,579.77 rows=1 width=1,748) (actual time=23.705..27.383 rows=74 loops=1)

16. 0.060 27.315 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,569.69..9,579.10 rows=1 width=1,678) (actual time=23.702..27.315 rows=74 loops=1)

17. 0.063 27.107 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,569.41..9,578.79 rows=1 width=1,674) (actual time=23.695..27.107 rows=74 loops=1)

18. 0.071 27.044 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,569.27..9,578.47 rows=1 width=1,658) (actual time=23.692..27.044 rows=74 loops=1)

19. 0.066 26.973 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,569.12..9,578.30 rows=1 width=1,650) (actual time=23.689..26.973 rows=74 loops=1)

20. 0.071 26.907 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,568.85..9,577.99 rows=1 width=1,617) (actual time=23.685..26.907 rows=74 loops=1)

21. 0.085 26.762 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,568.72..9,577.84 rows=1 width=1,574) (actual time=23.682..26.762 rows=74 loops=1)

22. 0.081 26.529 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,568.30..9,577.37 rows=1 width=1,540) (actual time=23.674..26.529 rows=74 loops=1)

23. 0.106 26.374 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,568.16..9,577.20 rows=1 width=1,527) (actual time=23.670..26.374 rows=74 loops=1)

24. 0.077 26.194 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,568.03..9,577.04 rows=1 width=1,514) (actual time=23.666..26.194 rows=74 loops=1)

25. 0.068 25.969 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,567.89..9,576.88 rows=1 width=1,498) (actual time=23.661..25.969 rows=74 loops=1)

26. 0.034 25.901 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,567.62..9,576.57 rows=1 width=1,455) (actual time=23.659..25.901 rows=74 loops=1)

27. 0.037 25.719 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,567.34..9,576.27 rows=1 width=1,437) (actual time=23.655..25.719 rows=74 loops=1)

28. 0.161 25.460 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,566.92..9,575.80 rows=1 width=1,405) (actual time=23.650..25.460 rows=74 loops=1)

  • Filter: (COALESCE(guiaprestador.guistatusanaliseglosa, guiaconvenio.guistatusanaliseglosa) = ANY ('{ProntaParaAnalise,EmAnalise,Analisada,ComPendencia}'::text[]))
29. 0.059 25.151 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,566.49..9,567.34 rows=1 width=1,066) (actual time=23.641..25.151 rows=74 loops=1)

30. 0.040 25.092 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,566.06..9,566.67 rows=1 width=1,068) (actual time=23.638..25.092 rows=74 loops=1)

31. 0.062 24.830 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,565.64..9,565.99 rows=1 width=1,044) (actual time=23.629..24.830 rows=74 loops=1)

32. 0.074 24.694 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,565.51..9,565.84 rows=1 width=1,001) (actual time=23.623..24.694 rows=74 loops=1)

33. 0.061 24.472 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,565.09..9,565.37 rows=1 width=1,001) (actual time=23.613..24.472 rows=74 loops=1)

  • Join Filter: (competenciaprestador.comp_convenio = detalhes_quitacao_rpa.nome_convenio)
34. 0.058 24.189 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,564.81..9,565.02 rows=1 width=990) (actual time=23.604..24.189 rows=74 loops=1)

35. 0.031 24.131 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,564.39..9,564.56 rows=1 width=968) (actual time=23.602..24.131 rows=74 loops=1)

36. 0.058 23.952 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,564.24..9,564.39 rows=1 width=896) (actual time=23.596..23.952 rows=74 loops=1)

37. 0.031 23.894 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,563.97..9,564.09 rows=1 width=863) (actual time=23.594..23.894 rows=74 loops=1)

38. 0.096 23.715 ↓ 74.0 74 1

Merge Left Join (cost=9,563.83..9,563.92 rows=1 width=850) (actual time=23.588..23.715 rows=74 loops=1)

  • Merge Cond: (guiaprestador.guistatusanaliseglosa = statusprestadoranalise.stcodigo)
39. 0.130 23.578 ↓ 74.0 74 1

Sort (cost=9,562.39..9,562.39 rows=1 width=837) (actual time=23.559..23.578 rows=74 loops=1)

  • Sort Key: guiaprestador.guistatusanaliseglosa
  • Sort Method: quicksort Memory: 100kB
40. 0.094 23.448 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,537.51..9,562.38 rows=1 width=837) (actual time=15.260..23.448 rows=74 loops=1)

41. 0.064 23.280 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,537.38..9,562.21 rows=1 width=821) (actual time=15.257..23.280 rows=74 loops=1)

42. 0.057 23.068 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,537.24..9,562.05 rows=1 width=805) (actual time=15.249..23.068 rows=74 loops=1)

43. 0.028 23.011 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,536.96..9,561.75 rows=1 width=762) (actual time=15.247..23.011 rows=74 loops=1)

44. 0.074 22.835 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,536.69..9,561.44 rows=1 width=744) (actual time=15.241..22.835 rows=74 loops=1)

45. 0.061 22.613 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,536.40..9,561.12 rows=1 width=694) (actual time=15.233..22.613 rows=74 loops=1)

46. 0.055 22.330 ↓ 74.0 74 1

Nested Loop Left Join (cost=9,535.98..9,560.65 rows=1 width=641) (actual time=15.224..22.330 rows=74 loops=1)

47. 0.398 22.053 ↓ 74.0 74 1

GroupAggregate (cost=9,535.55..9,552.18 rows=1 width=217) (actual time=15.215..22.053 rows=74 loops=1)

  • Group Key: produtosinterno.idguiaprestador, produtosinterno.idguiaconvenio, produtosinterno.protocolo_ultimo_pagamento
48. 0.097 15.143 ↓ 148.0 148 1

Sort (cost=9,535.55..9,535.55 rows=1 width=110) (actual time=15.128..15.143 rows=148 loops=1)

  • Sort Key: produtosinterno.idguiaprestador, produtosinterno.idguiaconvenio, produtosinterno.protocolo_ultimo_pagamento
  • Sort Method: quicksort Memory: 45kB
49. 0.041 15.046 ↓ 148.0 148 1

Subquery Scan on produtosinterno (cost=21.13..9,535.54 rows=1 width=110) (actual time=0.222..15.046 rows=148 loops=1)

50. 0.732 15.005 ↓ 148.0 148 1

Nested Loop Left Join (cost=21.13..9,535.53 rows=1 width=1,193) (actual time=0.220..15.005 rows=148 loops=1)

51. 0.146 9.241 ↓ 148.0 148 1

Nested Loop Left Join (cost=20.84..9,516.86 rows=1 width=174) (actual time=0.102..9.241 rows=148 loops=1)

52. 0.085 8.799 ↓ 148.0 148 1

Nested Loop (cost=20.41..9,514.71 rows=1 width=160) (actual time=0.095..8.799 rows=148 loops=1)

53. 0.093 8.418 ↓ 148.0 148 1

Nested Loop (cost=20.14..9,506.41 rows=1 width=168) (actual time=0.090..8.418 rows=148 loops=1)

54. 0.744 7.881 ↓ 5.7 148 1

Nested Loop (cost=19.71..9,450.12 rows=26 width=152) (actual time=0.081..7.881 rows=148 loops=1)

55. 1.092 2.725 ↓ 28.3 2,206 1

Nested Loop (cost=19.27..9,261.25 rows=78 width=98) (actual time=0.069..2.725 rows=2,206 loops=1)

56. 0.077 0.428 ↓ 60.2 241 1

Hash Join (cost=18.84..564.67 rows=4 width=25) (actual time=0.056..0.428 rows=241 loops=1)

  • Hash Cond: (guiaprestador_1.guicompetencia = competenciaprestador_1.id)
57. 0.317 0.317 ↓ 1.5 241 1

Index Scan using idx_fiboguia_guicompetenciaassoc_idx on fiboguia guiaprestador_1 (cost=0.43..545.61 rows=163 width=33) (actual time=0.016..0.317 rows=241 loops=1)

  • Index Cond: (guicompetenciaassoc = '315817989'::bigint)
  • Filter: ((discriminador <> 'CONVENIO'::text) AND (guiorigem = 'HOSPITAL'::text))
  • Rows Removed by Filter: 228
58. 0.003 0.034 ↑ 1.0 22 1

Hash (cost=18.13..18.13 rows=22 width=8) (actual time=0.034..0.034 rows=22 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
59. 0.019 0.031 ↑ 1.0 22 1

Bitmap Heap Scan on fibocompetencia competenciaprestador_1 (cost=4.45..18.13 rows=22 width=8) (actual time=0.017..0.031 rows=22 loops=1)

  • Recheck Cond: (comp_convenio = 'Embratel'::text)
  • Heap Blocks: exact=7
60. 0.012 0.012 ↑ 1.0 22 1

Bitmap Index Scan on idx_fibocompetencia_comp_convenio_idx (cost=0.00..4.44 rows=22 width=0) (actual time=0.012..0.012 rows=22 loops=1)

  • Index Cond: (comp_convenio = 'Embratel'::text)
61. 1.205 1.205 ↑ 75.0 9 241

Index Scan using idx_fiboproduto_prodguia_idx on fiboproduto produtoprestador (cost=0.44..2,167.40 rows=675 width=81) (actual time=0.002..0.005 rows=9 loops=241)

  • Index Cond: (prodguia = guiaprestador_1.id)
62. 4.412 4.412 ↓ 0.0 0 2,206

Index Scan using fiboproduto_pkey on fiboproduto produtoconvenio (cost=0.44..2.41 rows=1 width=62) (actual time=0.002..0.002 rows=0 loops=2,206)

  • Index Cond: (id = produtoprestador.prodassoc)
  • Filter: ((COALESCE(prodvlrtotal, '0'::numeric) - COALESCE(produtoprestador.prodvlrtotal, '0'::numeric)) < '0'::numeric)
  • Rows Removed by Filter: 1
63. 0.444 0.444 ↑ 1.0 1 148

Index Scan using fiboguia_pkey on fiboguia guiaconvenio_1 (cost=0.43..2.15 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=148)

  • Index Cond: (id = produtoconvenio.prodguia)
  • Filter: ((guicompetencia = '315817989'::bigint) AND (guiorigem = 'CONVENIO'::text))
64. 0.296 0.296 ↑ 1.0 1 148

Index Scan using fibocompetencia_pkey on fibocompetencia competenciaconvenio_1 (cost=0.28..8.29 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=148)

  • Index Cond: (id = '315817989'::bigint)
  • Filter: (comp_convenio = 'Embratel'::text)
65. 0.296 0.296 ↓ 0.0 0 148

Index Scan using idx_fiborecurso_rec_produto_idx on fiborecurso recursoproduto (cost=0.42..2.14 rows=1 width=30) (actual time=0.002..0.002 rows=0 loops=148)

  • Index Cond: (produtoprestador.id = rec_produto)
66. 0.000 0.000 ↓ 0.0 0 148

Index Only Scan using registro_envio_recurso_pkey on registro_envio_recurso registro_envio_item (cost=0.29..1.15 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=148)

  • Index Cond: (id = produtoprestador.registro_envio_recurso_id)
  • Heap Fetches: 0
67.          

SubPlan (forNested Loop Left Join)

68. 3.552 5.032 ↑ 1.0 1 148

Aggregate (cost=17.48..17.49 rows=1 width=32) (actual time=0.034..0.034 rows=1 loops=148)

69. 0.258 1.480 ↑ 1.0 1 148

Nested Loop Left Join (cost=1.15..17.22 rows=1 width=98) (actual time=0.008..0.010 rows=1 loops=148)

70. 0.000 0.888 ↑ 1.0 1 148

Nested Loop Left Join (cost=0.85..16.90 rows=1 width=38) (actual time=0.006..0.006 rows=1 loops=148)

71. 0.444 0.444 ↑ 1.0 1 148

Index Scan using idx_fiboglosasproduto_id_produto_idx on fiboglosasproduto glosasproduto (cost=0.43..8.45 rows=1 width=8) (actual time=0.002..0.003 rows=1 loops=148)

  • Index Cond: (id_produto = produtoconvenio.id)
72. 0.501 0.501 ↑ 1.0 1 167

Index Scan using fiboglosa_pkey on fiboglosa glosas_1 (cost=0.43..8.45 rows=1 width=46) (actual time=0.002..0.003 rows=1 loops=167)

  • Index Cond: (id = glosasproduto.elt)
73. 0.334 0.334 ↑ 1.0 1 167

Index Scan using fibomotivoglosa_pkey on fibomotivoglosa motivo_1 (cost=0.29..0.31 rows=1 width=68) (actual time=0.002..0.002 rows=1 loops=167)

  • Index Cond: (id = glosas_1.glo_motivo)
74.          

SubPlan (forGroupAggregate)

75. 0.148 6.512 ↑ 1.0 1 148

Result (cost=16.55..16.56 rows=1 width=1) (actual time=0.044..0.044 rows=1 loops=148)

76.          

Initplan (forResult)

77. 6.364 6.364 ↓ 0.0 0 148

Seq Scan on anexo_recurso anexo_recurso_2 (cost=0.00..16.55 rows=1 width=0) (actual time=0.043..0.043 rows=0 loops=148)

  • Filter: ((entidade_id = produtosinterno.idprodutoprestador) AND (nivel = 'Produto'::text))
  • Rows Removed by Filter: 570
78. 0.222 0.222 ↑ 1.0 1 74

Index Scan using fiboguia_pkey on fiboguia guiaprestador (cost=0.43..8.45 rows=1 width=433) (actual time=0.003..0.003 rows=1 loops=74)

  • Index Cond: (produtosinterno.idguiaprestador = id)
79. 0.222 0.222 ↑ 1.0 1 74

Index Scan using fibobeneficiario_pkey on fibobeneficiario beneficiarioprestador (cost=0.42..0.46 rows=1 width=69) (actual time=0.003..0.003 rows=1 loops=74)

  • Index Cond: (guiaprestador.guibenefic = id)
80. 0.148 0.148 ↑ 1.0 1 74

Index Scan using fiboremessa_pkey on fiboremessa remessa (cost=0.29..0.31 rows=1 width=66) (actual time=0.002..0.002 rows=1 loops=74)

  • Index Cond: (guiaprestador.guiremessa = id)
81. 0.148 0.148 ↑ 1.0 1 74

Index Scan using fibocompetencia_pkey on fibocompetencia competenciaprestador (cost=0.28..0.29 rows=1 width=26) (actual time=0.001..0.002 rows=1 loops=74)

  • Index Cond: (guiaprestador.guicompetencia = id)
82. 0.000 0.000 ↓ 0.0 0 74

Index Scan using fibodefinicaomotivoglosa_pkey on fibodefinicaomotivoglosa motivoglosaprestador (cost=0.28..0.29 rows=1 width=59) (actual time=0.000..0.000 rows=0 loops=74)

  • Index Cond: (guiaprestador.guimotglosa = id)
83. 0.148 0.148 ↑ 1.0 1 74

Index Scan using fibosituacaoguia_pkey on fibosituacaoguia situacaoinicialprestador (cost=0.14..0.16 rows=1 width=30) (actual time=0.002..0.002 rows=1 loops=74)

  • Index Cond: (guiaprestador.guisituacaoguia = sitcodigo)
84. 0.074 0.074 ↑ 1.0 1 74

Index Scan using fibosituacaoguia_pkey on fibosituacaoguia situacaoassociacaoprestador (cost=0.14..0.16 rows=1 width=30) (actual time=0.001..0.001 rows=1 loops=74)

  • Index Cond: (guiaprestador.guisituacaoguiaassoc = sitcodigo)
85. 0.035 0.041 ↓ 5.0 75 1

Sort (cost=1.44..1.48 rows=15 width=25) (actual time=0.024..0.041 rows=75 loops=1)

  • Sort Key: statusprestadoranalise.stcodigo
  • Sort Method: quicksort Memory: 26kB
86. 0.006 0.006 ↑ 1.0 15 1

Seq Scan on fibostatusguia statusprestadoranalise (cost=0.00..1.15 rows=15 width=25) (actual time=0.005..0.006 rows=15 loops=1)

87. 0.148 0.148 ↑ 1.0 1 74

Index Scan using fibostatustrabalho_pkey on fibostatusguia statusprestadorconciliacao (cost=0.14..0.15 rows=1 width=25) (actual time=0.001..0.002 rows=1 loops=74)

  • Index Cond: (guiaprestador.guistatusconciliacao = stcodigo)
88. 0.000 0.000 ↓ 0.0 0 74

Index Scan using fiboprestador_pkey on fiboprestador prestadororiginalprestador (cost=0.28..0.30 rows=1 width=41) (actual time=0.000..0.000 rows=0 loops=74)

  • Index Cond: (guiaprestador.guiprestoriginal = id)
89. 0.148 0.148 ↑ 1.0 1 74

Index Scan using idx_view_smartdata_operadoras_operadora_id_idx on view_smartdata_operadoras operadoraoriginalprestador (cost=0.14..0.16 rows=1 width=80) (actual time=0.001..0.002 rows=1 loops=74)

  • Index Cond: (guiaprestador.guioperadoraoriginal = operadora_id)
90. 0.000 0.000 ↓ 0.0 0 74

Index Scan using quitacao_sistema_gestao_pkey on quitacao_sistema_gestao (cost=0.42..0.44 rows=1 width=30) (actual time=0.000..0.000 rows=0 loops=74)

  • Index Cond: (guiaprestador.gui_quitacao_sistema_gestao = id)
91. 0.222 0.222 ↓ 0.0 0 74

Index Scan using idx_detalhes_quitacao_rpa_numero_remessa_idx on detalhes_quitacao_rpa (cost=0.28..0.34 rows=1 width=26) (actual time=0.003..0.003 rows=0 loops=74)

  • Index Cond: (remessa.rem_numero = numero_remessa)
92. 0.148 0.148 ↑ 1.0 1 74

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocoloprestador (cost=0.42..0.46 rows=1 width=16) (actual time=0.002..0.002 rows=1 loops=74)

  • Index Cond: (guiaprestador.guiprotocolo = id)
93. 0.074 0.074 ↑ 1.0 1 74

Index Scan using fibohospital_pkey on fibohospital hospitalprestador (cost=0.12..0.14 rows=1 width=51) (actual time=0.001..0.001 rows=1 loops=74)

  • Index Cond: (protocoloprestador.hospital = id)
94. 0.222 0.222 ↑ 1.0 1 74

Index Scan using idx_fiboguia_guiidguiaprestador_idx on fiboguia guiarecurso (cost=0.43..0.66 rows=1 width=32) (actual time=0.002..0.003 rows=1 loops=74)

  • Index Cond: (guiaprestador.id = guiidguiaprestador)
95. 0.000 0.000 ↓ 0.0 0 74

Index Scan using fiboguia_pkey on fiboguia guiapagamentorecurso (cost=0.43..0.66 rows=1 width=14) (actual time=0.000..0.000 rows=0 loops=74)

  • Index Cond: (id = guiarecurso.guiguiaassoc)
96. 0.148 0.148 ↑ 1.0 1 74

Index Scan using fiboguia_pkey on fiboguia guiaconvenio (cost=0.43..8.45 rows=1 width=347) (actual time=0.002..0.002 rows=1 loops=74)

  • Index Cond: (produtosinterno.idguiaconvenio = id)
97. 0.222 0.222 ↑ 1.0 1 74

Index Scan using fibobeneficiario_pkey on fibobeneficiario beneficiarioconvenio (cost=0.42..0.46 rows=1 width=48) (actual time=0.003..0.003 rows=1 loops=74)

  • Index Cond: (guiaconvenio.guibenefic = id)
98. 0.148 0.148 ↑ 1.0 1 74

Index Scan using fibocompetencia_pkey on fibocompetencia competenciaconvenio (cost=0.28..0.29 rows=1 width=26) (actual time=0.001..0.002 rows=1 loops=74)

  • Index Cond: (guiaconvenio.guicompetencia = id)
99. 0.000 0.000 ↓ 0.0 0 74

Index Scan using fibodefinicaomotivoglosa_pkey on fibodefinicaomotivoglosa motivoglosaconvenio (cost=0.28..0.29 rows=1 width=59) (actual time=0.000..0.000 rows=0 loops=74)

  • Index Cond: (guiaconvenio.guimotglosa = id)
100. 0.148 0.148 ↑ 1.0 1 74

Index Scan using fibosituacaoguia_pkey on fibosituacaoguia situacaoconvenio (cost=0.14..0.16 rows=1 width=30) (actual time=0.002..0.002 rows=1 loops=74)

  • Index Cond: (guiaconvenio.guisituacaoguia = sitcodigo)
101. 0.074 0.074 ↑ 1.0 1 74

Index Scan using fibostatustrabalho_pkey on fibostatusguia statusconvenioconciliacao (cost=0.14..0.15 rows=1 width=25) (actual time=0.001..0.001 rows=1 loops=74)

  • Index Cond: (guiaconvenio.guistatusconciliacao = stcodigo)
102. 0.074 0.074 ↑ 1.0 1 74

Index Scan using fibostatustrabalho_pkey on fibostatusguia statusconvenioanalise (cost=0.14..0.15 rows=1 width=25) (actual time=0.001..0.001 rows=1 loops=74)

  • Index Cond: (guiaprestador.guistatusanaliseglosa = stcodigo)
103. 0.148 0.148 ↑ 1.0 1 74

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocoloconvenio (cost=0.42..0.46 rows=1 width=50) (actual time=0.002..0.002 rows=1 loops=74)

  • Index Cond: (guiaconvenio.guiprotocolo = id)
104. 0.074 0.074 ↑ 1.0 1 74

Index Scan using fibohospital_pkey on fibohospital hospitalconvenio (cost=0.12..0.14 rows=1 width=51) (actual time=0.001..0.001 rows=1 loops=74)

  • Index Cond: (protocoloconvenio.hospital = id)
105. 0.000 0.000 ↓ 0.0 0 74

Index Scan using fiboprestador_pkey on fiboprestador prestadororiginalconvenio (cost=0.28..0.30 rows=1 width=41) (actual time=0.000..0.000 rows=0 loops=74)

  • Index Cond: (guiaconvenio.guiprestoriginal = id)
106. 0.000 0.000 ↓ 0.0 0 74

Index Scan using fibooperadora_pkey on fibooperadora operadoraoriginalconvenio (cost=0.14..0.16 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=74)

  • Index Cond: (guiaconvenio.guioperadoraoriginal = id)
107. 0.000 0.000 ↓ 0.0 0 74

Index Scan using idx_fibooperadora_temp_id_idx on fibooperadora_temp operadoraoriginalconvenio_temp (cost=0.14..0.31 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=74)

  • Index Cond: (operadoraoriginalconvenio.id = id)
108. 0.148 0.148 ↑ 1.0 1 74

Index Scan using recebimento_pkey on recebimento (cost=0.28..0.30 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=74)

  • Index Cond: (guiaconvenio.recebimento_id = id)
109. 0.000 0.000 ↓ 0.0 0 74

Index Scan using fiboguia_pkey on fiboguia guiacobrancaoriginal (cost=0.43..0.66 rows=1 width=78) (actual time=0.000..0.000 rows=0 loops=74)

  • Index Cond: (guiaconvenio.guicobrancaoriginal = id)
110. 0.000 0.000 ↓ 0.0 0 74

Index Scan using fiboremessa_pkey on fiboremessa remessacobrancaoriginal (cost=0.29..0.31 rows=1 width=39) (actual time=0.000..0.000 rows=0 loops=74)

  • Index Cond: (guiacobrancaoriginal.guiremessa = id)
111. 0.000 0.000 ↓ 0.0 0 74

Index Scan using fibobeneficiario_pkey on fibobeneficiario beneficiariocobrancaoriginal (cost=0.42..0.46 rows=1 width=33) (actual time=0.000..0.000 rows=0 loops=74)

  • Index Cond: (guiacobrancaoriginal.guibenefic = id)
112. 0.000 0.000 ↓ 0.0 0 74

Index Scan using fibooperadora_pkey on fibooperadora operadoraoriginalcobrancaoriginal (cost=0.14..0.16 rows=1 width=24) (actual time=0.000..0.000 rows=0 loops=74)

  • Index Cond: (guiacobrancaoriginal.guioperadoraoriginal = id)
113. 0.000 0.000 ↓ 0.0 0 2

Index Scan using id_lote_recurso_pkey on lote_recurso (cost=0.29..0.31 rows=1 width=78) (actual time=0.000..0.000 rows=0 loops=2)

  • Index Cond: (guiaprestador.id_lote_recurso = id)
114. 0.018 0.018 ↑ 1.0 1 2

Index Scan using idx_sincronia_recursos_aceites_erp_numero_conta_idx on sincronia_recursos_aceites_erp (cost=0.29..0.32 rows=1 width=63) (actual time=0.009..0.009 rows=1 loops=2)

  • Index Cond: (guiaprestador.guinumconta = numero_conta)
  • Filter: CASE WHEN (guia_de_recurso IS TRUE) THEN (guiaprestador.discriminador = 'RECURSO'::text) ELSE (guiaprestador.discriminador = 'PRESTADOR'::text) END
115. 0.004 0.004 ↓ 0.0 0 2

Index Scan using idx_pendencia_guia_id_idx on pendencia (cost=0.15..0.17 rows=1 width=48) (actual time=0.002..0.002 rows=0 loops=2)

  • Index Cond: (guia_id = guiaprestador.id)
116.          

SubPlan (forHash Right Join)

117. 0.000 0.000 ↓ 0.0 0

Seq Scan on anexo_recurso (cost=0.00..16.55 rows=1 width=0) (never executed)

  • Filter: ((entidade_id = guiaprestador.id) AND (nivel = 'Guia'::text))
118. 0.107 0.107 ↑ 1.0 565 1

Seq Scan on anexo_recurso anexo_recurso_1 (cost=0.00..15.12 rows=565 width=8) (actual time=0.010..0.107 rows=565 loops=1)

  • Filter: (nivel = 'Guia'::text)
  • Rows Removed by Filter: 5
119. 0.010 0.010 ↓ 0.0 0 2

Index Only Scan using idx_fiboguia_id_guia_originaria_idx on fiboguia (cost=0.43..4.45 rows=1 width=0) (actual time=0.005..0.005 rows=0 loops=2)

  • Index Cond: (id_guia_originaria = guiaprestador.id)
  • Heap Fetches: 0
120. 0.004 0.004 ↓ 0.0 0 2

Index Only Scan using idx_fiboguia_id_guia_originaria_idx on fiboguia fiboguia_1 (cost=0.43..4.45 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=2)

  • Index Cond: (id_guia_originaria = guiaconvenio.id)
  • Heap Fetches: 0
121. 0.006 0.016 ↑ 1.0 1 2

Aggregate (cost=17.33..17.34 rows=1 width=32) (actual time=0.008..0.008 rows=1 loops=2)

122. 0.004 0.010 ↓ 0.0 0 2

Nested Loop Left Join (cost=1.00..17.08 rows=1 width=90) (actual time=0.005..0.005 rows=0 loops=2)

123. 0.002 0.006 ↓ 0.0 0 2

Nested Loop Left Join (cost=0.71..16.76 rows=1 width=38) (actual time=0.003..0.003 rows=0 loops=2)

124. 0.004 0.004 ↓ 0.0 0 2

Index Scan using idx_fiboglosasguia_id_guia_idx on fiboglosasguia glosasguia (cost=0.28..8.30 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=2)

  • Index Cond: (id_guia = guiaconvenio.id)
125. 0.000 0.000 ↓ 0.0 0

Index Scan using fiboglosa_pkey on fiboglosa glosas (cost=0.43..8.45 rows=1 width=46) (never executed)

  • Index Cond: (id = glosasguia.elt)
126. 0.000 0.000 ↓ 0.0 0

Index Scan using fibomotivoglosa_pkey on fibomotivoglosa motivo (cost=0.29..0.31 rows=1 width=68) (never executed)

  • Index Cond: (id = glosas.glo_motivo)
127. 0.000 0.008 ↑ 1.0 1 2

Aggregate (cost=8.44..8.45 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=2)

128. 0.008 0.008 ↓ 0.0 0 2

Index Scan using idx_espelhamento_site_convenio_guia_convenio_id_idx on espelhamento_site_convenio esp (cost=0.42..8.44 rows=1 width=15) (actual time=0.004..0.004 rows=0 loops=2)

  • Index Cond: (guia_convenio_id = guiaconvenio.id)
129. 0.000 0.002 ↓ 0.0 0 2

Index Scan using fiboguia_pkey on fiboguia fiboguia_3 (cost=8.87..16.89 rows=1 width=6) (actual time=0.001..0.001 rows=0 loops=2)

  • Index Cond: (id = $11)
130.          

Initplan (forIndex Scan)

131. 0.008 0.008 ↓ 0.0 0 2

Index Scan using idx_fiboguia_guiidguiaprestador_idx on fiboguia fiboguia_2 (cost=0.43..8.45 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=2)

  • Index Cond: (guiidguiaprestador = guiarecurso.id)
132. 0.002 0.010 ↑ 1.0 1 2

Aggregate (cost=10.49..10.50 rows=1 width=32) (actual time=0.005..0.005 rows=1 loops=2)

133. 0.008 0.008 ↓ 0.0 0 2

Index Scan using idx_fiboguia_guicobrancaoriginal_idx on fiboguia pagrecurso (cost=0.43..10.49 rows=1 width=6) (actual time=0.004..0.004 rows=0 loops=2)

  • Index Cond: (guicobrancaoriginal = guiaprestador.id)
  • Filter: (guisituacaoguia = 'PosAuditoria'::text)
134. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_devolucao_guia_guia_devolvida_id_idx on devolucao_guia devolucao (cost=0.14..8.16 rows=1 width=0) (never executed)

  • Index Cond: (guia_devolvida_id = guiaprestador.id)
  • Heap Fetches: 0
135. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on devolucao_guia devolucao_1 (cost=0.00..11.50 rows=150 width=8) (actual time=0.003..0.003 rows=0 loops=1)

Planning time : 35.579 ms
Execution time : 41.071 ms