explain.depesz.com

PostgreSQL's explain analyze made readable

Result: vitm

Settings
# exclusive inclusive rows x rows loops node
1. 0.059 926.549 ↑ 1.0 100 1

Limit (cost=721,262.30..721,262.55 rows=100 width=3,022) (actual time=926.473..926.549 rows=100 loops=1)

2. 18.014 926.490 ↑ 65.1 100 1

Sort (cost=721,262.30..721,278.57 rows=6,507 width=3,022) (actual time=926.471..926.490 rows=100 loops=1)

  • Sort Key: (COALESCE(round((COALESCE(guiaconvenio_1.guivalortotal, '0'::numeric) - COALESCE(guiaprestador_1.guivalortotal, '0'::numeric)), 4), '0'::numeric))
  • Sort Method: top-N heapsort Memory: 226kB
3. 70.467 908.476 ↑ 1.0 6,357 1

WindowAgg (cost=8,718.08..720,948.54 rows=6,507 width=3,022) (actual time=886.506..908.476 rows=6,357 loops=1)

4. 137.849 838.009 ↑ 1.0 6,357 1

Hash Left Join (cost=8,718.08..720,411.71 rows=6,507 width=2,620) (actual time=85.109..838.009 rows=6,357 loops=1)

  • Hash Cond: (guiaprestador.id = pendencia.guia_id)
5.          

Initplan (forHash Left Join)

6. 0.028 0.028 ↑ 1.0 1 1

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

  • Filter: ((cc_tipo = 'HOSPITAL'::text) AND (ccnome = 'permitirAceiteComProdutoRecursado'::text))
  • Rows Removed by Filter: 91
7. 7.975 603.852 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=8,696.50..154,617.63 rows=6,507 width=1,696) (actual time=82.700..603.852 rows=6,357 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))
8. 8.686 545.021 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=8,696.21..152,431.73 rows=6,507 width=1,661) (actual time=82.654..545.021 rows=6,357 loops=1)

9. 5.311 536.335 ↑ 1.0 6,357 1

Hash Left Join (cost=8,695.92..150,357.71 rows=6,507 width=1,591) (actual time=82.650..536.335 rows=6,357 loops=1)

  • Hash Cond: (guiacobrancaoriginal.guioperadoraoriginal = operadoraoriginalcobrancaoriginal.operadora_id)
10. 7.068 530.939 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=8,687.11..150,268.58 rows=6,507 width=1,565) (actual time=82.546..530.939 rows=6,357 loops=1)

11. 7.127 523.871 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=8,686.68..147,195.94 rows=6,507 width=1,548) (actual time=82.541..523.871 rows=6,357 loops=1)

12. 8.366 516.744 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=8,686.39..145,100.76 rows=6,507 width=1,525) (actual time=82.538..516.744 rows=6,357 loops=1)

13. 6.331 508.378 ↑ 1.0 6,357 1

Hash Left Join (cost=8,685.97..140,721.08 rows=6,507 width=1,455) (actual time=82.533..508.378 rows=6,357 loops=1)

  • Hash Cond: (guiaconvenio.recebimento_id = recebimento.id)
14. 5.708 500.777 ↑ 1.0 6,357 1

Hash Left Join (cost=8,587.46..140,571.24 rows=6,507 width=1,451) (actual time=81.246..500.777 rows=6,357 loops=1)

  • Hash Cond: (guiaconvenio.guioperadoraoriginal = operadoraoriginalconvenio.operadora_id)
15. 5.807 495.018 ↑ 1.0 6,357 1

Hash Left Join (cost=8,578.65..140,482.11 rows=6,507 width=1,425) (actual time=81.186..495.018 rows=6,357 loops=1)

  • Hash Cond: (guiaconvenio.guiprestoriginal = prestadororiginalconvenio.id)
16. 6.224 488.873 ↑ 1.0 6,357 1

Hash Left Join (cost=8,530.65..140,401.06 rows=6,507 width=1,392) (actual time=80.836..488.873 rows=6,357 loops=1)

  • Hash Cond: (protocoloconvenio.hospital = hospitalconvenio.id)
17. 7.732 482.642 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=8,529.63..140,310.57 rows=6,507 width=1,349) (actual time=80.819..482.642 rows=6,357 loops=1)

18. 4.847 455.839 ↑ 1.0 6,357 1

Hash Left Join (cost=8,529.21..137,224.60 rows=6,507 width=1,315) (actual time=80.793..455.839 rows=6,357 loops=1)

  • Hash Cond: (guiaprestador.guistatusanaliseglosa = statusconvenioanalise.stcodigo)
19. 6.207 450.983 ↑ 1.0 6,357 1

Hash Left Join (cost=8,527.87..137,185.02 rows=6,507 width=1,302) (actual time=80.774..450.983 rows=6,357 loops=1)

  • Hash Cond: (guiaconvenio.guistatusconciliacao = statusconvenioconciliacao.stcodigo)
20. 5.823 444.766 ↑ 1.0 6,357 1

Hash Left Join (cost=8,526.53..137,094.21 rows=6,507 width=1,289) (actual time=80.755..444.766 rows=6,357 loops=1)

  • Hash Cond: (guiaconvenio.guisituacaoguia = situacaoconvenio.sitcodigo)
21. 4.747 438.928 ↑ 1.0 6,357 1

Hash Left Join (cost=8,524.97..137,003.18 rows=6,507 width=1,273) (actual time=80.726..438.928 rows=6,357 loops=1)

  • Hash Cond: (guiaconvenio.guimotglosa = motivoglosaconvenio.id)
22. 5.966 433.865 ↑ 1.0 6,357 1

Hash Left Join (cost=8,484.18..136,937.97 rows=6,507 width=1,230) (actual time=80.400..433.865 rows=6,357 loops=1)

  • Hash Cond: (guiaconvenio.guicompetencia = competenciaconvenio.id)
23. 9.495 427.639 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=8,453.11..136,817.44 rows=6,507 width=1,212) (actual time=80.126..427.639 rows=6,357 loops=1)

24. 9.625 348.217 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=8,452.69..133,744.80 rows=6,507 width=1,180) (actual time=79.860..348.217 rows=6,357 loops=1)

25. 5.960 319.521 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=8,452.26..88,428.43 rows=6,507 width=849) (actual time=79.834..319.521 rows=6,357 loops=1)

26. 3.131 313.561 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=8,451.83..84,048.75 rows=6,507 width=851) (actual time=79.832..313.561 rows=6,357 loops=1)

27. 4.865 291.359 ↑ 1.0 6,357 1

Hash Left Join (cost=8,451.41..79,669.07 rows=6,507 width=827) (actual time=79.809..291.359 rows=6,357 loops=1)

  • Hash Cond: (protocoloprestador.hospital = hospitalprestador.id)
28. 8.169 286.482 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=8,450.38..79,578.58 rows=6,507 width=784) (actual time=79.780..286.482 rows=6,357 loops=1)

29. 4.848 252.885 ↑ 1.0 6,357 1

Hash Left Join (cost=8,449.96..76,492.61 rows=6,507 width=784) (actual time=79.745..252.885 rows=6,357 loops=1)

  • Hash Cond: ((competenciaprestador.comp_convenio = detalhes_quitacao_rpa.nome_convenio) AND (remessa.rem_numero = detalhes_quitacao_rpa.numero_remessa))
30. 3.543 241.173 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=7,796.01..75,789.71 rows=6,507 width=773) (actual time=72.803..241.173 rows=6,357 loops=1)

31. 4.990 224.916 ↑ 1.0 6,357 1

Hash Left Join (cost=7,795.59..72,834.38 rows=6,507 width=751) (actual time=72.460..224.916 rows=6,357 loops=1)

  • Hash Cond: (guiaprestador.guioperadoraoriginal = operadoraoriginalprestador.operadora_id)
32. 3.966 219.865 ↑ 1.0 6,357 1

Hash Left Join (cost=7,786.78..72,745.25 rows=6,507 width=725) (actual time=72.389..219.865 rows=6,357 loops=1)

  • Hash Cond: (guiaprestador.guiprestoriginal = prestadororiginalprestador.id)
33. 4.016 215.457 ↑ 1.0 6,357 1

Hash Left Join (cost=7,738.78..72,664.20 rows=6,507 width=692) (actual time=71.934..215.457 rows=6,357 loops=1)

  • Hash Cond: (guiaprestador.guistatusanaliseglosa = statusprestadoranalise.stcodigo)
34. 4.834 211.432 ↑ 1.0 6,357 1

Hash Left Join (cost=7,737.44..72,624.62 rows=6,507 width=679) (actual time=71.914..211.432 rows=6,357 loops=1)

  • Hash Cond: (guiaprestador.guistatusconciliacao = statusprestadorconciliacao.stcodigo)
35. 4.809 206.586 ↑ 1.0 6,357 1

Hash Left Join (cost=7,736.11..72,533.81 rows=6,507 width=666) (actual time=71.893..206.586 rows=6,357 loops=1)

  • Hash Cond: (guiaprestador.guisituacaoguiaassoc = situacaoassociacaoprestador.sitcodigo)
36. 4.840 201.766 ↑ 1.0 6,357 1

Hash Left Join (cost=7,734.54..72,442.78 rows=6,507 width=650) (actual time=71.870..201.766 rows=6,357 loops=1)

  • Hash Cond: (guiaprestador.guisituacaoguia = situacaoinicialprestador.sitcodigo)
37. 3.463 196.906 ↑ 1.0 6,357 1

Hash Left Join (cost=7,732.98..72,351.74 rows=6,507 width=634) (actual time=71.823..196.906 rows=6,357 loops=1)

  • Hash Cond: (guiaprestador.guimotglosa = motivoglosaprestador.id)
38. 4.952 193.124 ↑ 1.0 6,357 1

Hash Left Join (cost=7,692.19..72,286.54 rows=6,507 width=591) (actual time=71.496..193.124 rows=6,357 loops=1)

  • Hash Cond: (guiaprestador.guicompetencia = competenciaprestador.id)
39. 4.640 187.927 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=7,661.12..72,166.00 rows=6,507 width=573) (actual time=71.239..187.927 rows=6,357 loops=1)

40. 9.558 164.216 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=7,660.83..70,070.82 rows=6,507 width=523) (actual time=71.219..164.216 rows=6,357 loops=1)

41. 12.080 129.230 ↑ 1.0 6,357 1

Nested Loop Left Join (cost=7,660.41..66,998.18 rows=6,507 width=470) (actual time=71.190..129.230 rows=6,357 loops=1)

42. 5.828 91.722 ↑ 1.0 6,357 1

Hash Full Join (cost=7,659.98..21,681.81 rows=6,507 width=53) (actual time=71.161..91.722 rows=6,357 loops=1)

  • Hash Cond: (guiaconvenio_1.id = guiaprestador_1.guiguiaassoc)
43. 4.257 14.791 ↑ 1.0 6,357 1

Nested Loop (cost=0.70..13,998.12 rows=6,507 width=23) (actual time=0.048..14.791 rows=6,357 loops=1)

44. 0.010 0.010 ↑ 1.0 1 1

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

  • Index Cond: (id = '329678849'::bigint)
  • Filter: (comp_convenio = 'SulAmerica'::text)
45. 10.524 10.524 ↑ 1.0 6,357 1

Index Scan using idx_fiboguia_guicompetencia_idx on fiboguia guiaconvenio_1 (cost=0.43..13,924.76 rows=6,507 width=31) (actual time=0.036..10.524 rows=6,357 loops=1)

  • Index Cond: (guicompetencia = '329678849'::bigint)
  • Filter: (guiorigem = 'CONVENIO'::text)
  • Rows Removed by Filter: 6926
46. 1.356 71.103 ↓ 60.2 6,320 1

Hash (cost=7,657.97..7,657.97 rows=105 width=30) (actual time=71.103..71.103 rows=6,320 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 473kB
47. 1.870 69.747 ↓ 60.2 6,320 1

Nested Loop (cost=263.28..7,657.97 rows=105 width=30) (actual time=37.356..69.747 rows=6,320 loops=1)

48. 0.372 0.372 ↑ 1.0 23 1

Index Scan using fibocompetencia_pkey on fibocompetencia competenciaprestador_1 (cost=0.28..54.84 rows=23 width=8) (actual time=0.009..0.372 rows=23 loops=1)

  • Filter: (comp_convenio = 'SulAmerica'::text)
  • Rows Removed by Filter: 780
49. 8.786 67.505 ↓ 55.0 275 23

Bitmap Heap Scan on fiboguia guiaprestador_1 (cost=263.00..330.52 rows=5 width=38) (actual time=2.737..2.935 rows=275 loops=23)

  • Recheck Cond: ((guicompetencia = competenciaprestador_1.id) AND (guicompetenciaassoc = '329678849'::bigint))
  • Filter: ((discriminador <> 'CONVENIO'::text) AND (guiorigem = 'HOSPITAL'::text))
  • Rows Removed by Filter: 259
  • Heap Blocks: exact=1605
50. 2.599 58.719 ↓ 0.0 0 23

BitmapAnd (cost=263.00..263.00 rows=17 width=0) (actual time=2.553..2.553 rows=0 loops=23)

51. 34.753 34.753 ↓ 5.8 10,233 23

Bitmap Index Scan on idx_fiboguia_guicompetencia_idx (cost=0.00..33.42 rows=1,755 width=0) (actual time=1.511..1.511 rows=10,233 loops=23)

  • Index Cond: (guicompetencia = competenciaprestador_1.id)
52. 21.367 21.367 ↓ 1.0 12,278 23

Bitmap Index Scan on idx_fiboguia_guicompetenciaassoc_idx (cost=0.00..228.42 rows=12,265 width=0) (actual time=0.929..0.929 rows=12,278 loops=23)

  • Index Cond: (guicompetenciaassoc = '329678849'::bigint)
53. 25.428 25.428 ↑ 1.0 1 6,357

Index Scan using fiboguia_pkey on fiboguia guiaprestador (cost=0.43..6.95 rows=1 width=433) (actual time=0.004..0.004 rows=1 loops=6,357)

  • Index Cond: (COALESCE(guiaprestador_1.id, guiaconvenio_1.guiguiaassoc) = id)
54. 25.428 25.428 ↑ 1.0 1 6,357

Index Scan using fibobeneficiario_pkey on fibobeneficiario beneficiarioprestador (cost=0.42..0.46 rows=1 width=69) (actual time=0.004..0.004 rows=1 loops=6,357)

  • Index Cond: (guiaprestador.guibenefic = id)
55. 19.071 19.071 ↑ 1.0 1 6,357

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

  • Index Cond: (guiaprestador.guiremessa = id)
56. 0.109 0.245 ↑ 1.0 803 1

Hash (cost=21.03..21.03 rows=803 width=26) (actual time=0.245..0.245 rows=803 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
57. 0.136 0.136 ↑ 1.0 803 1

Seq Scan on fibocompetencia competenciaprestador (cost=0.00..21.03 rows=803 width=26) (actual time=0.009..0.136 rows=803 loops=1)

58. 0.156 0.319 ↑ 1.0 1,013 1

Hash (cost=28.13..28.13 rows=1,013 width=59) (actual time=0.319..0.319 rows=1,013 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 102kB
59. 0.163 0.163 ↑ 1.0 1,013 1

Seq Scan on fibodefinicaomotivoglosa motivoglosaprestador (cost=0.00..28.13 rows=1,013 width=59) (actual time=0.013..0.163 rows=1,013 loops=1)

60. 0.012 0.020 ↑ 1.0 25 1

Hash (cost=1.25..1.25 rows=25 width=30) (actual time=0.020..0.020 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
61. 0.008 0.008 ↑ 1.0 25 1

Seq Scan on fibosituacaoguia situacaoinicialprestador (cost=0.00..1.25 rows=25 width=30) (actual time=0.004..0.008 rows=25 loops=1)

62. 0.006 0.011 ↑ 1.0 25 1

Hash (cost=1.25..1.25 rows=25 width=30) (actual time=0.011..0.011 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
63. 0.005 0.005 ↑ 1.0 25 1

Seq Scan on fibosituacaoguia situacaoassociacaoprestador (cost=0.00..1.25 rows=25 width=30) (actual time=0.002..0.005 rows=25 loops=1)

64. 0.006 0.012 ↑ 1.0 15 1

Hash (cost=1.15..1.15 rows=15 width=25) (actual time=0.012..0.012 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
65. 0.006 0.006 ↑ 1.0 15 1

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

66. 0.008 0.009 ↑ 1.0 15 1

Hash (cost=1.15..1.15 rows=15 width=25) (actual time=0.008..0.009 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
67. 0.001 0.001 ↑ 1.0 15 1

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

68. 0.250 0.442 ↑ 1.0 1,511 1

Hash (cost=29.11..29.11 rows=1,511 width=41) (actual time=0.442..0.442 rows=1,511 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 125kB
69. 0.192 0.192 ↑ 1.0 1,511 1

Seq Scan on fiboprestador prestadororiginalprestador (cost=0.00..29.11 rows=1,511 width=41) (actual time=0.004..0.192 rows=1,511 loops=1)

70. 0.020 0.061 ↑ 1.2 105 1

Hash (cost=7.25..7.25 rows=125 width=34) (actual time=0.061..0.061 rows=105 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
71. 0.041 0.041 ↑ 1.2 105 1

Seq Scan on view_smartdata_operadoras operadoraoriginalprestador (cost=0.00..7.25 rows=125 width=34) (actual time=0.009..0.041 rows=105 loops=1)

72. 12.714 12.714 ↓ 0.0 0 6,357

Index Scan using quitacao_sistema_gestao_pkey on quitacao_sistema_gestao (cost=0.42..0.44 rows=1 width=30) (actual time=0.002..0.002 rows=0 loops=6,357)

  • Index Cond: (guiaprestador.gui_quitacao_sistema_gestao = id)
73. 1.019 6.864 ↑ 1.0 4,318 1

Hash (cost=589.18..589.18 rows=4,318 width=26) (actual time=6.864..6.864 rows=4,318 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 299kB
74. 5.845 5.845 ↑ 1.0 4,318 1

Seq Scan on detalhes_quitacao_rpa (cost=0.00..589.18 rows=4,318 width=26) (actual time=0.303..5.845 rows=4,318 loops=1)

75. 25.428 25.428 ↑ 1.0 1 6,357

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocoloprestador (cost=0.42..0.46 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=6,357)

  • Index Cond: (guiaprestador.guiprotocolo = id)
76. 0.003 0.012 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=51) (actual time=0.012..0.012 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
77. 0.009 0.009 ↑ 1.0 1 1

Seq Scan on fibohospital hospitalprestador (cost=0.00..1.01 rows=1 width=51) (actual time=0.009..0.009 rows=1 loops=1)

78. 19.071 19.071 ↓ 0.0 0 6,357

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=0 loops=6,357)

  • Index Cond: (guiaprestador.id = guiidguiaprestador)
79. 0.000 0.000 ↓ 0.0 0 6,357

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

  • Index Cond: (id = guiarecurso.guiguiaassoc)
80. 19.071 19.071 ↑ 1.0 1 6,357

Index Scan using fiboguia_pkey on fiboguia guiaconvenio (cost=0.43..6.95 rows=1 width=347) (actual time=0.003..0.003 rows=1 loops=6,357)

  • Index Cond: (COALESCE(guiaconvenio_1.id, guiaprestador_1.guiguiaassoc) = id)
81. 69.927 69.927 ↑ 1.0 1 6,357

Index Scan using fibobeneficiario_pkey on fibobeneficiario beneficiarioconvenio (cost=0.42..0.46 rows=1 width=48) (actual time=0.011..0.011 rows=1 loops=6,357)

  • Index Cond: (guiaconvenio.guibenefic = id)
82. 0.146 0.260 ↑ 1.0 803 1

Hash (cost=21.03..21.03 rows=803 width=26) (actual time=0.260..0.260 rows=803 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
83. 0.114 0.114 ↑ 1.0 803 1

Seq Scan on fibocompetencia competenciaconvenio (cost=0.00..21.03 rows=803 width=26) (actual time=0.004..0.114 rows=803 loops=1)

84. 0.182 0.316 ↑ 1.0 1,013 1

Hash (cost=28.13..28.13 rows=1,013 width=59) (actual time=0.316..0.316 rows=1,013 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 102kB
85. 0.134 0.134 ↑ 1.0 1,013 1

Seq Scan on fibodefinicaomotivoglosa motivoglosaconvenio (cost=0.00..28.13 rows=1,013 width=59) (actual time=0.004..0.134 rows=1,013 loops=1)

86. 0.007 0.015 ↑ 1.0 25 1

Hash (cost=1.25..1.25 rows=25 width=30) (actual time=0.015..0.015 rows=25 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
87. 0.008 0.008 ↑ 1.0 25 1

Seq Scan on fibosituacaoguia situacaoconvenio (cost=0.00..1.25 rows=25 width=30) (actual time=0.005..0.008 rows=25 loops=1)

88. 0.006 0.010 ↑ 1.0 15 1

Hash (cost=1.15..1.15 rows=15 width=25) (actual time=0.010..0.010 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
89. 0.004 0.004 ↑ 1.0 15 1

Seq Scan on fibostatusguia statusconvenioconciliacao (cost=0.00..1.15 rows=15 width=25) (actual time=0.002..0.004 rows=15 loops=1)

90. 0.005 0.009 ↑ 1.0 15 1

Hash (cost=1.15..1.15 rows=15 width=25) (actual time=0.009..0.009 rows=15 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
91. 0.004 0.004 ↑ 1.0 15 1

Seq Scan on fibostatusguia statusconvenioanalise (cost=0.00..1.15 rows=15 width=25) (actual time=0.002..0.004 rows=15 loops=1)

92. 19.071 19.071 ↑ 1.0 1 6,357

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocoloconvenio (cost=0.42..0.46 rows=1 width=50) (actual time=0.003..0.003 rows=1 loops=6,357)

  • Index Cond: (guiaconvenio.guiprotocolo = id)
93. 0.003 0.007 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=51) (actual time=0.007..0.007 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
94. 0.004 0.004 ↑ 1.0 1 1

Seq Scan on fibohospital hospitalconvenio (cost=0.00..1.01 rows=1 width=51) (actual time=0.003..0.004 rows=1 loops=1)

95. 0.234 0.338 ↑ 1.0 1,511 1

Hash (cost=29.11..29.11 rows=1,511 width=41) (actual time=0.338..0.338 rows=1,511 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 125kB
96. 0.104 0.104 ↑ 1.0 1,511 1

Seq Scan on fiboprestador prestadororiginalconvenio (cost=0.00..29.11 rows=1,511 width=41) (actual time=0.004..0.104 rows=1,511 loops=1)

97. 0.020 0.051 ↑ 1.2 105 1

Hash (cost=7.25..7.25 rows=125 width=34) (actual time=0.051..0.051 rows=105 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
98. 0.031 0.031 ↑ 1.2 105 1

Seq Scan on view_smartdata_operadoras operadoraoriginalconvenio (cost=0.00..7.25 rows=125 width=34) (actual time=0.005..0.031 rows=105 loops=1)

99. 0.429 1.270 ↑ 1.0 1,889 1

Hash (cost=74.89..74.89 rows=1,889 width=12) (actual time=1.270..1.270 rows=1,889 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 105kB
100. 0.841 0.841 ↑ 1.0 1,889 1

Seq Scan on recebimento (cost=0.00..74.89 rows=1,889 width=12) (actual time=0.005..0.841 rows=1,889 loops=1)

101. 0.000 0.000 ↓ 0.0 0 6,357

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

  • Index Cond: (guiaconvenio.guicobrancaoriginal = id)
102. 0.000 0.000 ↓ 0.0 0 6,357

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

  • Index Cond: (guiacobrancaoriginal.guiremessa = id)
103. 0.000 0.000 ↓ 0.0 0 6,357

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

  • Index Cond: (guiacobrancaoriginal.guibenefic = id)
104. 0.044 0.085 ↑ 1.2 105 1

Hash (cost=7.25..7.25 rows=125 width=34) (actual time=0.085..0.085 rows=105 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
105. 0.041 0.041 ↑ 1.2 105 1

Seq Scan on view_smartdata_operadoras operadoraoriginalcobrancaoriginal (cost=0.00..7.25 rows=125 width=34) (actual time=0.006..0.041 rows=105 loops=1)

106. 0.000 0.000 ↓ 0.0 0 6,357

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

  • Index Cond: (guiaprestador.id_lote_recurso = id)
107. 50.856 50.856 ↓ 0.0 0 6,357

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.008..0.008 rows=0 loops=6,357)

  • 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
  • Rows Removed by Filter: 0
108. 0.000 0.003 ↓ 0.0 0 1

Hash (cost=13.20..13.20 rows=320 width=48) (actual time=0.003..0.003 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
109. 0.003 0.003 ↓ 0.0 0 1

Seq Scan on pendencia (cost=0.00..13.20 rows=320 width=48) (actual time=0.003..0.003 rows=0 loops=1)

110.          

SubPlan (forHash Left Join)

111. 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))
112. 0.919 0.919 ↑ 1.0 565 1

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

  • Filter: (nivel = 'Guia'::text)
  • Rows Removed by Filter: 5
113. 12.714 12.714 ↓ 0.0 0 6,357

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

  • Index Cond: (id_guia_originaria = guiaprestador.id)
  • Heap Fetches: 0
114. 6.357 6.357 ↓ 0.0 0 6,357

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.001..0.001 rows=0 loops=6,357)

  • Index Cond: (id_guia_originaria = guiaconvenio.id)
  • Heap Fetches: 0
115. 12.714 38.142 ↑ 1.0 1 6,357

Aggregate (cost=17.33..17.34 rows=1 width=32) (actual time=0.006..0.006 rows=1 loops=6,357)

116. 5.517 25.428 ↓ 0.0 0 6,357

Nested Loop Left Join (cost=1.00..17.08 rows=1 width=90) (actual time=0.004..0.004 rows=0 loops=6,357)

117. 0.000 19.071 ↓ 0.0 0 6,357

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

118. 12.714 12.714 ↓ 0.0 0 6,357

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

  • Index Cond: (id_guia = guiaconvenio.id)
119. 7.320 7.320 ↑ 1.0 1 120

Index Scan using fiboglosa_pkey on fiboglosa glosas (cost=0.43..8.45 rows=1 width=46) (actual time=0.061..0.061 rows=1 loops=120)

  • Index Cond: (id = glosasguia.elt)
120. 0.840 0.840 ↑ 1.0 1 120

Index Scan using fibomotivoglosa_pkey on fibomotivoglosa motivo (cost=0.29..0.31 rows=1 width=68) (actual time=0.007..0.007 rows=1 loops=120)

  • Index Cond: (id = glosas.glo_motivo)
121. 6.357 19.071 ↑ 1.0 1 6,357

Aggregate (cost=8.44..8.45 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=6,357)

122. 12.714 12.714 ↓ 0.0 0 6,357

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.002..0.002 rows=0 loops=6,357)

  • Index Cond: (guia_convenio_id = guiaconvenio.id)
123. 0.000 0.000 ↓ 0.0 0 6,357

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

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

Initplan (forIndex Scan)

125. 0.000 0.000 ↓ 0.0 0 6,357

Index Scan using idx_fiboguia_guiidguiaprestador_idx on fiboguia fiboguia_2 (cost=0.43..8.45 rows=1 width=8) (actual time=0.000..0.000 rows=0 loops=6,357)

  • Index Cond: (guiidguiaprestador = guiarecurso.id)
126. 6.357 19.071 ↑ 1.0 1 6,357

Aggregate (cost=10.49..10.50 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=6,357)

127. 12.714 12.714 ↓ 0.0 0 6,357

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

  • Index Cond: (guicobrancaoriginal = guiaprestador.id)
  • Filter: (guisituacaoguia = 'PosAuditoria'::text)
  • Rows Removed by Filter: 0
128. 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
129. 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 : 57.868 ms
Execution time : 929.017 ms