explain.depesz.com

PostgreSQL's explain analyze made readable

Result: P8le

Settings
# exclusive inclusive rows x rows loops node
1. 0.041 1,667.066 ↑ 1.0 100 1

Limit (cost=159,772.60..159,772.85 rows=100 width=3,022) (actual time=1,667.003..1,667.066 rows=100 loops=1)

2. 20.752 1,667.025 ↑ 5.9 100 1

Sort (cost=159,772.60..159,774.07 rows=590 width=3,022) (actual time=1,667.002..1,667.025 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. 67.420 1,646.273 ↓ 13.1 7,710 1

WindowAgg (cost=46,397.44..159,744.15 rows=590 width=3,022) (actual time=1,620.744..1,646.273 rows=7,710 loops=1)

4. 123.805 1,578.853 ↓ 13.1 7,710 1

Hash Left Join (cost=46,397.44..159,695.47 rows=590 width=2,620) (actual time=436.926..1,578.853 rows=7,710 loops=1)

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

Initplan (forHash Left Join)

6. 0.023 0.023 ↑ 1.0 1 1

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

  • Filter: ((cc_tipo = 'HOSPITAL'::text) AND (ccnome = 'permitirAceiteComProdutoRecursado'::text))
  • Rows Removed by Filter: 91
7. 8.967 1,377.805 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,375.86..108,374.39 rows=590 width=1,696) (actual time=436.539..1,377.805 rows=7,710 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))
  • Rows Removed by Join Filter: 11
8. 8.223 1,330.288 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,375.57..108,176.19 rows=590 width=1,661) (actual time=436.506..1,330.288 rows=7,710 loops=1)

9. 5.319 1,322.065 ↓ 13.1 7,710 1

Hash Left Join (cost=46,375.28..107,988.14 rows=590 width=1,591) (actual time=436.486..1,322.065 rows=7,710 loops=1)

  • Hash Cond: (guiacobrancaoriginal.guioperadoraoriginal = operadoraoriginalcobrancaoriginal.operadora_id)
10. 6.496 1,316.700 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,366.47..107,972.04 rows=590 width=1,565) (actual time=436.431..1,316.700 rows=7,710 loops=1)

11. 6.709 1,310.204 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,366.05..107,693.44 rows=590 width=1,548) (actual time=436.428..1,310.204 rows=7,710 loops=1)

12. 6.678 1,303.495 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,365.76..107,503.47 rows=590 width=1,525) (actual time=436.426..1,303.495 rows=7,710 loops=1)

13. 5.727 1,296.817 ↓ 13.1 7,710 1

Hash Left Join (cost=46,365.33..107,106.36 rows=590 width=1,455) (actual time=436.423..1,296.817 rows=7,710 loops=1)

  • Hash Cond: (guiaconvenio.recebimento_id = recebimento.id)
14. 5.755 1,290.486 ↓ 13.1 7,710 1

Hash Left Join (cost=46,266.83..107,003.20 rows=590 width=1,451) (actual time=435.806..1,290.486 rows=7,710 loops=1)

  • Hash Cond: (guiaconvenio.guioperadoraoriginal = operadoraoriginalconvenio.operadora_id)
15. 4.498 1,284.687 ↓ 13.1 7,710 1

Hash Left Join (cost=46,258.01..106,987.11 rows=590 width=1,425) (actual time=435.752..1,284.687 rows=7,710 loops=1)

  • Hash Cond: (guiaconvenio.guiprestoriginal = prestadororiginalconvenio.id)
16. 5.349 1,279.875 ↓ 13.1 7,710 1

Hash Left Join (cost=46,210.02..106,936.12 rows=590 width=1,392) (actual time=435.427..1,279.875 rows=7,710 loops=1)

  • Hash Cond: (protocoloconvenio.hospital = hospitalconvenio.id)
17. 7.984 1,274.522 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,208.99..106,926.98 rows=590 width=1,349) (actual time=435.413..1,274.522 rows=7,710 loops=1)

18. 4.847 1,251.118 ↓ 13.1 7,710 1

Hash Left Join (cost=46,208.57..106,647.17 rows=590 width=1,315) (actual time=435.407..1,251.118 rows=7,710 loops=1)

  • Hash Cond: (guiaprestador.guistatusanaliseglosa = statusconvenioanalise.stcodigo)
19. 5.460 1,246.259 ↓ 13.1 7,710 1

Hash Left Join (cost=46,207.23..106,642.37 rows=590 width=1,302) (actual time=435.383..1,246.259 rows=7,710 loops=1)

  • Hash Cond: (guiaconvenio.guistatusconciliacao = statusconvenioconciliacao.stcodigo)
20. 5.473 1,240.791 ↓ 13.1 7,710 1

Hash Left Join (cost=46,205.90..106,632.92 rows=590 width=1,289) (actual time=435.366..1,240.791 rows=7,710 loops=1)

  • Hash Cond: (guiaconvenio.guisituacaoguia = situacaoconvenio.sitcodigo)
21. 4.218 1,235.306 ↓ 13.1 7,710 1

Hash Left Join (cost=46,204.33..106,623.25 rows=590 width=1,273) (actual time=435.343..1,235.306 rows=7,710 loops=1)

  • Hash Cond: (guiaconvenio.guimotglosa = motivoglosaconvenio.id)
22. 5.294 1,230.788 ↓ 13.1 7,710 1

Hash Left Join (cost=46,163.54..106,580.23 rows=590 width=1,230) (actual time=435.032..1,230.788 rows=7,710 loops=1)

  • Hash Cond: (guiaconvenio.guicompetencia = competenciaconvenio.id)
23. 10.557 1,225.253 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,132.47..106,541.05 rows=590 width=1,212) (actual time=434.776..1,225.253 rows=7,710 loops=1)

24. 9.498 1,199.276 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,132.05..106,262.45 rows=590 width=1,180) (actual time=434.765..1,199.276 rows=7,710 loops=1)

25. 7.206 1,174.358 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,131.62..105,564.73 rows=590 width=849) (actual time=434.758..1,174.358 rows=7,710 loops=1)

26. 5.198 1,167.152 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,131.20..105,167.61 rows=590 width=851) (actual time=434.756..1,167.152 rows=7,710 loops=1)

27. 4.943 1,146.534 ↓ 13.1 7,710 1

Hash Left Join (cost=46,130.77..104,770.50 rows=590 width=827) (actual time=434.742..1,146.534 rows=7,710 loops=1)

  • Hash Cond: (protocoloprestador.hospital = hospitalprestador.id)
28. 8.667 1,141.584 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,129.75..104,761.37 rows=590 width=784) (actual time=434.723..1,141.584 rows=7,710 loops=1)

29. 8.729 1,117.497 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,129.32..104,481.56 rows=590 width=784) (actual time=434.712..1,117.497 rows=7,710 loops=1)

  • Join Filter: (competenciaprestador.comp_convenio = detalhes_quitacao_rpa.nome_convenio)
30. 2.323 1,085.638 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=46,129.04..104,274.08 rows=590 width=773) (actual time=434.700..1,085.638 rows=7,710 loops=1)

31. 4.650 1,075.605 ↓ 13.1 7,710 1

Hash Left Join (cost=46,128.62..104,006.12 rows=590 width=751) (actual time=434.697..1,075.605 rows=7,710 loops=1)

  • Hash Cond: (guiaprestador.guioperadoraoriginal = operadoraoriginalprestador.operadora_id)
32. 3.305 1,070.901 ↓ 13.1 7,710 1

Hash Left Join (cost=46,119.81..103,990.02 rows=590 width=725) (actual time=434.632..1,070.901 rows=7,710 loops=1)

  • Hash Cond: (guiaprestador.guiprestoriginal = prestadororiginalprestador.id)
33. 3.866 1,067.241 ↓ 13.1 7,710 1

Hash Left Join (cost=46,071.81..103,939.03 rows=590 width=692) (actual time=434.267..1,067.241 rows=7,710 loops=1)

  • Hash Cond: (guiaprestador.guistatusanaliseglosa = statusprestadoranalise.stcodigo)
34. 4.834 1,063.366 ↓ 13.1 7,710 1

Hash Left Join (cost=46,070.47..103,934.23 rows=590 width=679) (actual time=434.250..1,063.366 rows=7,710 loops=1)

  • Hash Cond: (guiaprestador.guistatusconciliacao = statusprestadorconciliacao.stcodigo)
35. 4.427 1,058.521 ↓ 13.1 7,710 1

Hash Left Join (cost=46,069.14..103,924.78 rows=590 width=666) (actual time=434.226..1,058.521 rows=7,710 loops=1)

  • Hash Cond: (guiaprestador.guisituacaoguiaassoc = situacaoassociacaoprestador.sitcodigo)
36. 4.646 1,054.081 ↓ 13.1 7,710 1

Hash Left Join (cost=46,067.57..103,915.11 rows=590 width=650) (actual time=434.204..1,054.081 rows=7,710 loops=1)

  • Hash Cond: (guiaprestador.guisituacaoguia = situacaoinicialprestador.sitcodigo)
37. 3.334 1,049.420 ↓ 13.1 7,710 1

Hash Left Join (cost=46,066.01..103,905.43 rows=590 width=634) (actual time=434.176..1,049.420 rows=7,710 loops=1)

  • Hash Cond: (guiaprestador.guimotglosa = motivoglosaprestador.id)
38. 4.198 1,045.757 ↓ 13.1 7,710 1

Hash Left Join (cost=46,025.22..103,862.42 rows=590 width=591) (actual time=433.839..1,045.757 rows=7,710 loops=1)

  • Hash Cond: (guiaprestador.guicompetencia = competenciaprestador.id)
39. 6.393 1,041.275 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=45,994.15..103,823.24 rows=590 width=573) (actual time=433.531..1,041.275 rows=7,710 loops=1)

40. 7.579 1,019.462 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=45,993.86..103,633.26 rows=590 width=523) (actual time=433.513..1,019.462 rows=7,710 loops=1)

41. 10.614 988.753 ↓ 13.1 7,710 1

Nested Loop Left Join (cost=45,993.44..103,354.66 rows=590 width=470) (actual time=433.501..988.753 rows=7,710 loops=1)

42. 5.726 962.719 ↓ 13.1 7,710 1

Hash Full Join (cost=45,993.01..102,656.94 rows=590 width=53) (actual time=433.494..962.719 rows=7,710 loops=1)

  • Hash Cond: (guiaprestador_1.guiguiaassoc = guiaconvenio_1.id)
43. 5.474 724.362 ↓ 19.7 7,704 1

Nested Loop (cost=1.55..56,664.00 rows=391 width=30) (actual time=200.847..724.362 rows=7,704 loops=1)

44. 138.574 475.930 ↓ 11.2 121,479 1

Nested Loop (cost=1.13..51,389.51 rows=10,892 width=38) (actual time=0.043..475.930 rows=121,479 loops=1)

45. 45.494 181.524 ↓ 14.3 155,832 1

Nested Loop (cost=0.70..38,508.78 rows=10,892 width=30) (actual time=0.028..181.524 rows=155,832 loops=1)

46. 0.330 0.330 ↑ 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.011..0.330 rows=23 loops=1)

  • Filter: (comp_convenio = 'Bradesco'::text)
  • Rows Removed by Filter: 780
47. 135.700 135.700 ↓ 12.9 6,775 23

Index Scan using idx_fiboguia_guicompetencia_idx on fiboguia guiaprestador_1 (cost=0.43..1,666.65 rows=526 width=38) (actual time=0.061..5.900 rows=6,775 loops=23)

  • Index Cond: (guicompetencia = competenciaprestador_1.id)
  • Filter: ((discriminador <> 'CONVENIO'::text) AND (guiorigem = 'HOSPITAL'::text))
  • Rows Removed by Filter: 5880
48. 155.832 155.832 ↑ 1.0 1 155,832

Index Scan using fiboguia_pkey on fiboguia guiaconvparaprestador (cost=0.43..1.17 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=155,832)

  • Index Cond: (id = guiaprestador_1.guiguiaassoc)
49. 242.958 242.958 ↓ 0.0 0 121,479

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocoloconvparaprestador (cost=0.42..0.47 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=121,479)

  • Index Cond: (id = guiaconvparaprestador.guiprotocolo)
  • Filter: ((data_pagto >= '2019-05-01 00:00:00'::timestamp without time zone) AND (data_pagto < '2019-06-01 00:00:00'::timestamp without time zone) AND (data_pagto >= '2019-05-01 00:00:00'::timestamp without time zone) AND (data_pagto < '2019-06-01 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 1
50. 1.440 232.631 ↓ 13.1 7,710 1

Hash (cost=45,984.08..45,984.08 rows=590 width=23) (actual time=232.631..232.631 rows=7,710 loops=1)

  • Buckets: 8192 (originally 1024) Batches: 1 (originally 1) Memory Usage: 488kB
51. 19.172 231.191 ↓ 13.1 7,710 1

Hash Join (cost=7,447.71..45,984.08 rows=590 width=23) (actual time=192.045..231.191 rows=7,710 loops=1)

  • Hash Cond: (guiaconvenio_1.guiprotocolo = protocoloconvenio_1.id)
52. 47.408 192.201 ↓ 8.2 135,242 1

Nested Loop (cost=0.70..38,469.51 rows=16,445 width=31) (actual time=0.034..192.201 rows=135,242 loops=1)

53. 0.330 0.330 ↑ 1.0 23 1

Index Scan using fibocompetencia_pkey on fibocompetencia competenciaconvenio_1 (cost=0.28..54.84 rows=23 width=8) (actual time=0.012..0.330 rows=23 loops=1)

  • Filter: (comp_convenio = 'Bradesco'::text)
  • Rows Removed by Filter: 780
54. 144.463 144.463 ↓ 7.4 5,880 23

Index Scan using idx_fiboguia_guicompetencia_idx on fiboguia guiaconvenio_1 (cost=0.43..1,662.26 rows=794 width=39) (actual time=0.554..6.281 rows=5,880 loops=23)

  • Index Cond: (guicompetencia = competenciaconvenio_1.id)
  • Filter: (guiorigem = 'CONVENIO'::text)
  • Rows Removed by Filter: 6775
55. 2.734 19.818 ↓ 1.0 14,557 1

Hash (cost=7,273.03..7,273.03 rows=13,918 width=8) (actual time=19.818..19.818 rows=14,557 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 697kB
56. 14.161 17.084 ↓ 1.0 14,557 1

Bitmap Heap Scan on fiboprotocolo protocoloconvenio_1 (cost=368.67..7,273.03 rows=13,918 width=8) (actual time=2.985..17.084 rows=14,557 loops=1)

  • Recheck Cond: ((data_pagto >= '2019-05-01 00:00:00'::timestamp without time zone) AND (data_pagto < '2019-06-01 00:00:00'::timestamp without time zone) AND (data_pagto >= '2019-05-01 00:00:00'::timestamp without time zone) AND (data_pagto < '2019-06-01 00:00:00'::timestamp without time zone))
  • Heap Blocks: exact=474
57. 2.923 2.923 ↓ 1.0 14,557 1

Bitmap Index Scan on idx_fiboprotocolo_data_pagto_idx (cost=0.00..365.19 rows=13,918 width=0) (actual time=2.923..2.923 rows=14,557 loops=1)

  • Index Cond: ((data_pagto >= '2019-05-01 00:00:00'::timestamp without time zone) AND (data_pagto < '2019-06-01 00:00:00'::timestamp without time zone) AND (data_pagto >= '2019-05-01 00:00:00'::timestamp without time zone) AND (data_pagto < '2019-06-01 00:00:00'::timestamp without time zone))
58. 15.420 15.420 ↑ 1.0 1 7,710

Index Scan using fiboguia_pkey on fiboguia guiaprestador (cost=0.43..1.17 rows=1 width=433) (actual time=0.002..0.002 rows=1 loops=7,710)

  • Index Cond: (COALESCE(guiaprestador_1.id, guiaconvenio_1.guiguiaassoc) = id)
59. 23.130 23.130 ↑ 1.0 1 7,710

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=7,710)

  • Index Cond: (guiaprestador.guibenefic = id)
60. 15.420 15.420 ↑ 1.0 1 7,710

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=7,710)

  • Index Cond: (guiaprestador.guiremessa = id)
61. 0.145 0.284 ↑ 1.0 803 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
62. 0.139 0.139 ↑ 1.0 803 1

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

63. 0.191 0.329 ↑ 1.0 1,013 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 102kB
64. 0.138 0.138 ↑ 1.0 1,013 1

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

65. 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
66. 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.003..0.008 rows=25 loops=1)

67. 0.008 0.013 ↑ 1.0 25 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
68. 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)

69. 0.006 0.011 ↑ 1.0 15 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
70. 0.005 0.005 ↑ 1.0 15 1

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

71. 0.006 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
72. 0.003 0.003 ↑ 1.0 15 1

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

73. 0.215 0.355 ↑ 1.0 1,511 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 125kB
74. 0.140 0.140 ↑ 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.140 rows=1,511 loops=1)

75. 0.026 0.054 ↑ 1.2 105 1

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

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

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

77. 7.710 7.710 ↓ 0.0 0 7,710

Index Scan using quitacao_sistema_gestao_pkey on quitacao_sistema_gestao (cost=0.42..0.44 rows=1 width=30) (actual time=0.001..0.001 rows=0 loops=7,710)

  • Index Cond: (guiaprestador.gui_quitacao_sistema_gestao = id)
78. 23.130 23.130 ↓ 0.0 0 7,710

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=7,710)

  • Index Cond: (remessa.rem_numero = numero_remessa)
79. 15.420 15.420 ↑ 1.0 1 7,710

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=7,710)

  • Index Cond: (guiaprestador.guiprotocolo = id)
80. 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
81. 0.004 0.004 ↑ 1.0 1 1

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

82. 15.420 15.420 ↓ 0.0 0 7,710

Index Scan using idx_fiboguia_guiidguiaprestador_idx on fiboguia guiarecurso (cost=0.43..0.66 rows=1 width=32) (actual time=0.002..0.002 rows=0 loops=7,710)

  • Index Cond: (guiaprestador.id = guiidguiaprestador)
83. 0.000 0.000 ↓ 0.0 0 7,710

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=7,710)

  • Index Cond: (id = guiarecurso.guiguiaassoc)
84. 15.420 15.420 ↑ 1.0 1 7,710

Index Scan using fiboguia_pkey on fiboguia guiaconvenio (cost=0.43..1.17 rows=1 width=347) (actual time=0.002..0.002 rows=1 loops=7,710)

  • Index Cond: (COALESCE(guiaconvenio_1.id, guiaprestador_1.guiguiaassoc) = id)
85. 15.420 15.420 ↑ 1.0 1 7,710

Index Scan using fibobeneficiario_pkey on fibobeneficiario beneficiarioconvenio (cost=0.42..0.46 rows=1 width=48) (actual time=0.002..0.002 rows=1 loops=7,710)

  • Index Cond: (guiaconvenio.guibenefic = id)
86. 0.127 0.241 ↑ 1.0 803 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
87. 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.002..0.114 rows=803 loops=1)

88. 0.177 0.300 ↑ 1.0 1,013 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 102kB
89. 0.123 0.123 ↑ 1.0 1,013 1

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

90. 0.006 0.012 ↑ 1.0 25 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
91. 0.006 0.006 ↑ 1.0 25 1

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

92. 0.005 0.008 ↑ 1.0 15 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
93. 0.003 0.003 ↑ 1.0 15 1

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

94. 0.009 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
95. 0.003 0.003 ↑ 1.0 15 1

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

96. 15.420 15.420 ↑ 1.0 1 7,710

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=7,710)

  • Index Cond: (guiaconvenio.guiprotocolo = id)
97. 0.002 0.004 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
98. 0.002 0.002 ↑ 1.0 1 1

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

99. 0.199 0.314 ↑ 1.0 1,511 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 125kB
100. 0.115 0.115 ↑ 1.0 1,511 1

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

101. 0.020 0.044 ↑ 1.2 105 1

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

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

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

103. 0.283 0.604 ↑ 1.0 1,889 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 105kB
104. 0.321 0.321 ↑ 1.0 1,889 1

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

105. 0.000 0.000 ↓ 0.0 0 7,710

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=7,710)

  • Index Cond: (guiaconvenio.guicobrancaoriginal = id)
106. 0.000 0.000 ↓ 0.0 0 7,710

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=7,710)

  • Index Cond: (guiacobrancaoriginal.guiremessa = id)
107. 0.000 0.000 ↓ 0.0 0 7,710

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=7,710)

  • Index Cond: (guiacobrancaoriginal.guibenefic = id)
108. 0.028 0.046 ↑ 1.2 105 1

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

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

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

110. 0.000 0.000 ↓ 0.0 0 7,710

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=7,710)

  • Index Cond: (guiaprestador.id_lote_recurso = id)
111. 38.550 38.550 ↓ 0.0 0 7,710

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.005..0.005 rows=0 loops=7,710)

  • 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
112. 0.000 0.002 ↓ 0.0 0 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
113. 0.002 0.002 ↓ 0.0 0 1

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

114.          

SubPlan (forHash Left Join)

115. 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))
116. 0.116 0.116 ↑ 1.0 565 1

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

  • Filter: (nivel = 'Guia'::text)
  • Rows Removed by Filter: 5
117. 15.420 15.420 ↓ 0.0 0 7,710

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=7,710)

  • Index Cond: (id_guia_originaria = guiaprestador.id)
  • Heap Fetches: 0
118. 7.710 7.710 ↓ 0.0 0 7,710

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=7,710)

  • Index Cond: (id_guia_originaria = guiaconvenio.id)
  • Heap Fetches: 0
119. 7.710 23.130 ↑ 1.0 1 7,710

Aggregate (cost=17.33..17.34 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=7,710)

120. 0.000 15.420 ↓ 0.0 0 7,710

Nested Loop Left Join (cost=1.00..17.08 rows=1 width=90) (actual time=0.002..0.002 rows=0 loops=7,710)

121. 7.074 15.420 ↓ 0.0 0 7,710

Nested Loop Left Join (cost=0.71..16.76 rows=1 width=38) (actual time=0.002..0.002 rows=0 loops=7,710)

122. 7.710 7.710 ↓ 0.0 0 7,710

Index Scan using idx_fiboglosasguia_id_guia_idx on fiboglosasguia glosasguia (cost=0.28..8.30 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=7,710)

  • Index Cond: (id_guia = guiaconvenio.id)
123. 0.636 0.636 ↑ 1.0 1 53

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

  • Index Cond: (id = glosasguia.elt)
124. 0.159 0.159 ↑ 1.0 1 53

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

  • Index Cond: (id = glosas.glo_motivo)
125. 0.000 15.420 ↑ 1.0 1 7,710

Aggregate (cost=8.44..8.45 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=7,710)

126. 15.420 15.420 ↓ 0.0 0 7,710

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=7,710)

  • Index Cond: (guia_convenio_id = guiaconvenio.id)
127. 0.000 0.000 ↓ 0.0 0 7,710

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=7,710)

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

Initplan (forIndex Scan)

129. 0.000 0.000 ↓ 0.0 0 7,710

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=7,710)

  • Index Cond: (guiidguiaprestador = guiarecurso.id)
130. 0.000 15.420 ↑ 1.0 1 7,710

Aggregate (cost=10.49..10.50 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=7,710)

131. 15.420 15.420 ↓ 0.0 0 7,710

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=7,710)

  • Index Cond: (guicobrancaoriginal = guiaprestador.id)
  • Filter: (guisituacaoguia = 'PosAuditoria'::text)
132. 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
133. 0.002 0.002 ↓ 0.0 0 1

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

Planning time : 31.085 ms
Execution time : 1,669.363 ms