explain.depesz.com

PostgreSQL's explain analyze made readable

Result: YYCX

Settings
# exclusive inclusive rows x rows loops node
1. 0.047 1,542.761 ↑ 1.0 100 1

Limit (cost=67,818,162.34..67,818,162.59 rows=100 width=3,065) (actual time=1,542.705..1,542.761 rows=100 loops=1)

2. 17.464 1,542.714 ↑ 6,944.3 100 1

Sort (cost=67,818,162.34..67,819,898.42 rows=694,432 width=3,065) (actual time=1,542.703..1,542.714 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: 137kB
3. 61.439 1,525.250 ↑ 93.1 7,457 1

WindowAgg (cost=125,540.98..67,784,677.33 rows=694,432 width=3,065) (actual time=1,501.963..1,525.250 rows=7,457 loops=1)

4. 119.485 1,463.811 ↑ 93.1 7,457 1

Hash Left Join (cost=125,540.98..67,727,386.69 rows=694,432 width=2,663) (actual time=961.318..1,463.811 rows=7,457 loops=1)

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

Initplan (for Hash 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. 5.214 1,277.175 ↑ 21.8 7,457 1

Hash Left Join (cost=125,390.34..439,594.06 rows=162,821 width=1,983) (actual time=952.751..1,277.175 rows=7,457 loops=1)

  • Hash Cond: (guiaprestador.id = pendencia.guia_id)
8. 6.816 1,271.957 ↑ 21.8 7,457 1

Hash Left Join (cost=125,373.14..438,965.87 rows=162,821 width=1,943) (actual time=952.717..1,271.957 rows=7,457 loops=1)

  • Hash Cond: ((guiaprestador.guinumconta = sincronia_recursos_aceites_erp.numero_conta) AND (remessa.rem_numero = sincronia_recursos_aceites_erp.remessa))
  • 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 CASE WHEN (sincronia_recursos_aceites_erp.guia_de_recurso IS TRUE) THEN (guiaprestador.discriminador = 'RECURSO'::text) ELSE (guiaprestador.discriminador = 'PRESTADOR'::text) END)
9. 5.273 1,209.826 ↑ 21.8 7,457 1

Hash Left Join (cost=121,546.52..430,661.65 rows=162,821 width=1,908) (actual time=897.053..1,209.826 rows=7,457 loops=1)

  • Hash Cond: (guiaprestador.id_lote_recurso = lote_recurso.id)
10. 5.270 1,185.754 ↑ 21.8 7,457 1

Hash Left Join (cost=119,948.93..428,356.50 rows=162,821 width=1,838) (actual time=878.005..1,185.754 rows=7,457 loops=1)

  • Hash Cond: (guiacobrancaoriginal.guioperadoraoriginal = operadoraoriginalcobrancaoriginal.id)
11. 5.685 1,180.372 ↑ 21.8 7,457 1

Hash Left Join (cost=119,943.56..426,343.98 rows=162,821 width=1,822) (actual time=877.858..1,180.372 rows=7,457 loops=1)

  • Hash Cond: (operadoraoriginalconvenio.id_multitenant = operadora_multitenant_convenio.id)
12. 7.166 1,073.950 ↑ 5.1 7,457 1

Nested Loop Left Join (cost=119,797.31..420,417.88 rows=38,176 width=1,766) (actual time=777.099..1,073.950 rows=7,457 loops=1)

13. 5.142 1,066.784 ↑ 5.1 7,457 1

Hash Left Join (cost=119,796.89..402,391.27 rows=38,176 width=1,749) (actual time=777.094..1,066.784 rows=7,457 loops=1)

  • Hash Cond: (guiacobrancaoriginal.guiremessa = remessacobrancaoriginal.id)
14. 7.199 1,032.017 ↑ 5.1 7,457 1

Nested Loop Left Join (cost=117,244.60..399,489.77 rows=38,176 width=1,726) (actual time=747.299..1,032.017 rows=7,457 loops=1)

15. 5.151 1,024.818 ↑ 5.1 7,457 1

Hash Left Join (cost=117,244.17..373,797.17 rows=38,176 width=1,657) (actual time=747.296..1,024.818 rows=7,457 loops=1)

  • Hash Cond: (guiaconvenio.recebimento_id = recebimento.id)
16. 4.799 1,018.277 ↑ 5.1 7,457 1

Hash Left Join (cost=117,145.67..373,395.25 rows=38,176 width=1,653) (actual time=745.893..1,018.277 rows=7,457 loops=1)

  • Hash Cond: (guiaconvenio.guioperadoraoriginal = operadoraoriginalconvenio.id)
17. 4.704 1,013.436 ↑ 5.1 7,457 1

Hash Left Join (cost=117,140.30..372,919.28 rows=38,176 width=1,637) (actual time=745.843..1,013.436 rows=7,457 loops=1)

  • Hash Cond: (guiaconvenio.guiprestoriginal = prestadororiginalconvenio.id)
18. 5.224 1,008.410 ↑ 5.1 7,457 1

Hash Left Join (cost=117,092.31..372,678.63 rows=38,176 width=1,604) (actual time=745.510..1,008.410 rows=7,457 loops=1)

  • Hash Cond: (protocoloconvenio.hospital = hospitalconvenio.id)
19. 7.114 1,003.181 ↑ 5.1 7,457 1

Nested Loop Left Join (cost=117,091.28..372,152.69 rows=38,176 width=1,540) (actual time=745.493..1,003.181 rows=7,457 loops=1)

20. 4.262 966.239 ↑ 5.1 7,457 1

Hash Left Join (cost=117,090.86..354,047.87 rows=38,176 width=1,506) (actual time=745.042..966.239 rows=7,457 loops=1)

  • Hash Cond: (guiaprestador.guistatusanaliseglosa = statusconvenioanalise.stcodigo)
21. 4.671 961.969 ↑ 5.1 7,457 1

Hash Left Join (cost=117,089.52..353,820.26 rows=38,176 width=1,474) (actual time=745.027..961.969 rows=7,457 loops=1)

  • Hash Cond: (guiaconvenio.guistatusconciliacao = statusconvenioconciliacao.stcodigo)
22. 4.904 957.288 ↑ 5.1 7,457 1

Hash Left Join (cost=117,088.19..353,294.01 rows=38,176 width=1,442) (actual time=745.009..957.288 rows=7,457 loops=1)

  • Hash Cond: (guiaconvenio.guisituacaoguia = situacaoconvenio.sitcodigo)
23. 4.648 952.370 ↑ 5.1 7,457 1

Hash Left Join (cost=117,086.62..352,767.52 rows=38,176 width=1,410) (actual time=744.978..952.370 rows=7,457 loops=1)

  • Hash Cond: (guiaconvenio.guimotglosa = motivoglosaconvenio.id)
24. 4.861 947.391 ↑ 5.1 7,457 1

Hash Left Join (cost=117,045.83..352,583.56 rows=38,176 width=1,367) (actual time=744.640..947.391 rows=7,457 loops=1)

  • Hash Cond: (guiaconvenio.guicompetencia = competenciaconvenio.id)
25. 2.958 942.293 ↑ 5.1 7,457 1

Nested Loop Left Join (cost=117,014.76..352,027.57 rows=38,176 width=1,349) (actual time=744.398..942.293 rows=7,457 loops=1)

26. 6.527 902.050 ↑ 5.1 7,457 1

Nested Loop Left Join (cost=117,014.34..334,000.96 rows=38,176 width=1,317) (actual time=744.389..902.050 rows=7,457 loops=1)

27. 3.380 895.523 ↑ 5.1 7,457 1

Nested Loop Left Join (cost=117,013.91..308,308.36 rows=38,176 width=1,319) (actual time=744.387..895.523 rows=7,457 loops=1)

28. 5.879 877.229 ↑ 5.1 7,457 1

Hash Left Join (cost=117,013.49..282,615.76 rows=38,176 width=1,295) (actual time=744.374..877.229 rows=7,457 loops=1)

  • Hash Cond: (protocoloprestador.hospital = hospitalprestador.id)
29. 4.883 871.341 ↑ 5.1 7,457 1

Nested Loop Left Join (cost=117,012.46..282,089.82 rows=38,176 width=1,231) (actual time=744.350..871.341 rows=7,457 loops=1)

30. 104.569 844.087 ↑ 5.1 7,457 1

Merge Right Join (cost=117,012.04..263,985.00 rows=38,176 width=1,231) (actual time=744.040..844.087 rows=7,457 loops=1)

  • Merge Cond: (guiaconvenio.id = (COALESCE(guiaconvenio_1.id, guiaprestador_1.guiguiaassoc)))
31. 475.613 475.613 ↑ 1.0 1,263,808 1

Index Scan using fiboguia_pkey on fiboguia guiaconvenio (cost=0.43..143,132.43 rows=1,269,151 width=346) (actual time=0.013..475.613 rows=1,263,808 loops=1)

32. 1.737 263.905 ↑ 5.1 7,457 1

Materialize (cost=117,011.61..117,202.49 rows=38,176 width=901) (actual time=259.302..263.905 rows=7,457 loops=1)

33. 17.852 262.168 ↑ 5.1 7,457 1

Sort (cost=117,011.61..117,107.05 rows=38,176 width=901) (actual time=259.298..262.168 rows=7,457 loops=1)

  • Sort Key: (COALESCE(guiaconvenio_1.id, guiaprestador_1.guiguiaassoc))
  • Sort Method: quicksort Memory: 7171kB
34. 4.591 244.316 ↑ 5.1 7,457 1

Hash Left Join (cost=9,014.12..98,968.85 rows=38,176 width=901) (actual time=62.857..244.316 rows=7,457 loops=1)

  • Hash Cond: (operadoraoriginalprestador.id_multitenant = operadora_multitenant_prestador.id)
35. 5.059 232.704 ↑ 1.2 7,457 1

Hash Left Join (cost=8,867.87..97,467.41 rows=8,951 width=845) (actual time=55.820..232.704 rows=7,457 loops=1)

  • Hash Cond: ((competenciaprestador.comp_convenio = detalhes_quitacao_rpa.nome_convenio) AND (remessa.rem_numero = detalhes_quitacao_rpa.numero_remessa))
36. 6.202 224.946 ↑ 1.2 7,457 1

Nested Loop Left Join (cost=8,213.92..96,746.14 rows=8,951 width=834) (actual time=53.091..224.946 rows=7,457 loops=1)

37. 4.023 218.744 ↑ 1.2 7,457 1

Hash Left Join (cost=8,213.50..92,680.82 rows=8,951 width=812) (actual time=53.087..218.744 rows=7,457 loops=1)

  • Hash Cond: (guiaprestador.guioperadoraoriginal = operadoraoriginalprestador.id)
38. 3.026 214.678 ↑ 1.2 7,457 1

Hash Left Join (cost=8,208.13..92,565.11 rows=8,951 width=796) (actual time=53.033..214.678 rows=7,457 loops=1)

  • Hash Cond: (guiaprestador.guiprestoriginal = prestadororiginalprestador.id)
39. 3.228 210.740 ↑ 1.2 7,457 1

Hash Left Join (cost=8,160.14..92,471.95 rows=8,951 width=763) (actual time=52.111..210.740 rows=7,457 loops=1)

  • Hash Cond: (guiaprestador.guistatusanaliseglosa = statusprestadoranalise.stcodigo)
40. 4.258 207.504 ↑ 1.2 7,457 1

Hash Left Join (cost=8,158.80..92,417.55 rows=8,951 width=731) (actual time=52.089..207.504 rows=7,457 loops=1)

  • Hash Cond: (guiaprestador.guistatusconciliacao = statusprestadorconciliacao.stcodigo)
41. 4.200 203.235 ↑ 1.2 7,457 1

Hash Left Join (cost=8,157.46..92,293.14 rows=8,951 width=699) (actual time=52.071..203.235 rows=7,457 loops=1)

  • Hash Cond: (guiaprestador.guisituacaoguiaassoc = situacaoassociacaoprestador.sitcodigo)
42. 4.357 199.023 ↑ 1.2 7,457 1

Hash Left Join (cost=8,155.90..92,168.50 rows=8,951 width=667) (actual time=52.047..199.023 rows=7,457 loops=1)

  • Hash Cond: (guiaprestador.guisituacaoguia = situacaoinicialprestador.sitcodigo)
43. 2.880 194.651 ↑ 1.2 7,457 1

Hash Left Join (cost=8,154.34..92,043.86 rows=8,951 width=635) (actual time=52.023..194.651 rows=7,457 loops=1)

  • Hash Cond: (guiaprestador.guimotglosa = motivoglosaprestador.id)
44. 4.268 190.766 ↑ 1.2 7,457 1

Hash Left Join (cost=8,113.54..91,969.49 rows=8,951 width=592) (actual time=51.013..190.766 rows=7,457 loops=1)

  • Hash Cond: (guiaprestador.guicompetencia = competenciaprestador.id)
45. 3.931 186.263 ↑ 1.2 7,457 1

Nested Loop Left Join (cost=8,082.48..91,815.35 rows=8,951 width=574) (actual time=50.768..186.263 rows=7,457 loops=1)

46. 4.784 167.418 ↑ 1.2 7,457 1

Nested Loop Left Join (cost=8,082.19..88,933.23 rows=8,951 width=524) (actual time=50.744..167.418 rows=7,457 loops=1)

47. 4.458 95.521 ↑ 1.2 7,457 1

Nested Loop Left Join (cost=8,081.76..84,706.59 rows=8,951 width=471) (actual time=50.734..95.521 rows=7,457 loops=1)

48. 3.124 68.692 ↑ 1.2 7,457 1

Hash Full Join (cost=8,081.34..24,505.56 rows=8,951 width=53) (actual time=50.401..68.692 rows=7,457 loops=1)

  • Hash Cond: (guiaprestador_1.guiguiaassoc = guiaconvenio_1.id)
49. 3.193 15.198 ↑ 1.2 7,457 1

Nested Loop (cost=0.70..16,391.35 rows=8,951 width=30) (actual time=0.019..15.198 rows=7,457 loops=1)

50. 0.009 0.009 ↑ 1.0 1 1

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

  • Index Cond: (id = '355434497'::bigint)
  • Filter: (comp_convenio = 'Bradesco'::text)
51. 11.996 11.996 ↑ 1.2 7,457 1

Index Scan using idx_fiboguia_guicompetencia_idx on fiboguia guiaprestador_1 (cost=0.43..16,293.54 rows=8,951 width=38) (actual time=0.010..11.996 rows=7,457 loops=1)

  • Index Cond: (guicompetencia = '355434497'::bigint)
  • Filter: ((discriminador <> 'RECURSO'::text) AND (guiorigem = 'HOSPITAL'::text))
  • Rows Removed by Filter: 9772
52. 0.590 50.370 ↓ 26.2 3,459 1

Hash (cost=8,078.98..8,078.98 rows=132 width=23) (actual time=50.370..50.370 rows=3,459 loops=1)

  • Buckets: 4096 (originally 1024) Batches: 1 (originally 1) Memory Usage: 223kB
53. 0.817 49.780 ↓ 26.2 3,459 1

Nested Loop (cost=277.62..8,078.98 rows=132 width=23) (actual time=39.952..49.780 rows=3,459 loops=1)

54. 0.341 0.341 ↑ 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.341 rows=23 loops=1)

  • Filter: (comp_convenio = 'Bradesco'::text)
  • Rows Removed by Filter: 780
55. 6.693 48.622 ↓ 25.0 150 23

Bitmap Heap Scan on fiboguia guiaconvenio_1 (cost=277.35..348.82 rows=6 width=31) (actual time=1.949..2.114 rows=150 loops=23)

  • Recheck Cond: ((guicompetencia = competenciaconvenio_1.id) AND (guicompetenciaassoc = '355434497'::bigint))
  • Filter: ((guiassociada IS TRUE) AND (guisituacaoguia <> ALL ('{PagamentoDeRecurso,PagamentoDeRecursoAntigo}'::text[])) AND (guiorigem = 'CONVENIO'::text))
  • Rows Removed by Filter: 365
  • Heap Blocks: exact=2002
56. 2.875 41.929 ↓ 0.0 0 23

BitmapAnd (cost=277.35..277.35 rows=18 width=0) (actual time=1.823..1.823 rows=0 loops=23)

57. 18.722 18.722 ↓ 7.2 12,655 23

Bitmap Index Scan on idx_fiboguia_guicompetencia_idx (cost=0.00..33.48 rows=1,763 width=0) (actual time=0.814..0.814 rows=12,655 loops=23)

  • Index Cond: (guicompetencia = competenciaconvenio_1.id)
58. 20.332 20.332 ↑ 1.1 11,848 23

Bitmap Index Scan on idx_fiboguia_guicompetenciaassoc_idx (cost=0.00..242.47 rows=13,072 width=0) (actual time=0.884..0.884 rows=11,848 loops=23)

  • Index Cond: (guicompetenciaassoc = '355434497'::bigint)
59. 22.371 22.371 ↑ 1.0 1 7,457

Index Scan using fiboguia_pkey on fiboguia guiaprestador (cost=0.43..6.72 rows=1 width=434) (actual time=0.002..0.003 rows=1 loops=7,457)

  • Index Cond: (COALESCE(guiaprestador_1.id, guiaconvenio_1.guiguiaassoc) = id)
60. 67.113 67.113 ↑ 1.0 1 7,457

Index Scan using fibobeneficiario_pkey on fibobeneficiario beneficiarioprestador (cost=0.42..0.46 rows=1 width=69) (actual time=0.009..0.009 rows=1 loops=7,457)

  • Index Cond: (guiaprestador.guibenefic = id)
61. 14.914 14.914 ↑ 1.0 1 7,457

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

  • Index Cond: (guiaprestador.guiremessa = id)
62. 0.128 0.235 ↑ 1.0 803 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 54kB
63. 0.107 0.107 ↑ 1.0 803 1

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

64. 0.170 1.005 ↑ 1.0 1,013 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 102kB
65. 0.835 0.835 ↑ 1.0 1,013 1

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

66. 0.007 0.015 ↑ 1.0 25 1

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

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

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

68. 0.006 0.012 ↑ 1.0 25 1

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

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

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

70. 0.005 0.011 ↑ 1.0 15 1

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

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

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

72. 0.004 0.008 ↑ 1.0 15 1

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

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

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

74. 0.342 0.912 ↑ 1.0 1,511 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 125kB
75. 0.570 0.570 ↑ 1.0 1,511 1

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

76. 0.016 0.043 ↑ 1.0 104 1

Hash (cost=4.05..4.05 rows=105 width=24) (actual time=0.043..0.043 rows=104 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
77. 0.027 0.027 ↑ 1.0 104 1

Seq Scan on fibooperadora operadoraoriginalprestador (cost=0.00..4.05 rows=105 width=24) (actual time=0.005..0.027 rows=104 loops=1)

78. 0.000 0.000 ↓ 0.0 0 7,457

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

  • Index Cond: (guiaprestador.gui_quitacao_sistema_gestao = id)
79. 0.865 2.699 ↑ 1.0 4,318 1

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

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

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

81. 0.049 7.021 ↑ 8.1 105 1

Hash (cost=135.59..135.59 rows=853 width=72) (actual time=7.021..7.021 rows=105 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
82. 6.972 6.972 ↑ 8.1 105 1

Foreign Scan on operadora_multitenant operadora_multitenant_prestador (cost=100.00..135.59 rows=853 width=72) (actual time=5.308..6.972 rows=105 loops=1)

83. 22.371 22.371 ↑ 1.0 1 7,457

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocoloprestador (cost=0.42..0.46 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=7,457)

  • Index Cond: (guiaprestador.guiprotocolo = id)
84. 0.004 0.009 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=72) (actual time=0.008..0.009 rows=1 loops=1)

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

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

86. 14.914 14.914 ↓ 0.0 0 7,457

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

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

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

  • Index Cond: (id = guiarecurso.guiguiaassoc)
88. 37.285 37.285 ↓ 0.0 0 7,457

Index Scan using fibobeneficiario_pkey on fibobeneficiario beneficiarioconvenio (cost=0.42..0.46 rows=1 width=48) (actual time=0.004..0.005 rows=0 loops=7,457)

  • Index Cond: (guiaconvenio.guibenefic = id)
89. 0.098 0.237 ↑ 1.0 803 1

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

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

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

91. 0.197 0.331 ↑ 1.0 1,013 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 102kB
92. 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.006..0.134 rows=1,013 loops=1)

93. 0.008 0.014 ↑ 1.0 25 1

Hash (cost=1.25..1.25 rows=25 width=64) (actual time=0.014..0.014 rows=25 loops=1)

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

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

95. 0.005 0.010 ↑ 1.0 15 1

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

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

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

97. 0.007 0.008 ↑ 1.0 15 1

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

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

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

99. 29.828 29.828 ↓ 0.0 0 7,457

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocoloconvenio (cost=0.42..0.46 rows=1 width=50) (actual time=0.004..0.004 rows=0 loops=7,457)

  • Index Cond: (guiaconvenio.guiprotocolo = id)
100. 0.002 0.005 ↑ 1.0 1 1

Hash (cost=1.01..1.01 rows=1 width=72) (actual time=0.005..0.005 rows=1 loops=1)

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

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

102. 0.198 0.322 ↑ 1.0 1,511 1

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

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

104. 0.020 0.042 ↑ 1.0 104 1

Hash (cost=4.05..4.05 rows=105 width=24) (actual time=0.041..0.042 rows=104 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
105. 0.022 0.022 ↑ 1.0 104 1

Seq Scan on fibooperadora operadoraoriginalconvenio (cost=0.00..4.05 rows=105 width=24) (actual time=0.004..0.022 rows=104 loops=1)

106. 0.278 1.390 ↑ 1.0 1,889 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 105kB
107. 1.112 1.112 ↑ 1.0 1,889 1

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

108. 0.000 0.000 ↓ 0.0 0 7,457

Index Scan using fiboguia_pkey on fiboguia guiacobrancaoriginal (cost=0.43..0.66 rows=1 width=77) (actual time=0.000..0.000 rows=0 loops=7,457)

  • Index Cond: (guiaconvenio.guicobrancaoriginal = id)
109. 11.567 29.625 ↑ 1.0 57,213 1

Hash (cost=1,837.13..1,837.13 rows=57,213 width=39) (actual time=29.625..29.625 rows=57,213 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 4935kB
110. 18.058 18.058 ↑ 1.0 57,213 1

Seq Scan on fiboremessa remessacobrancaoriginal (cost=0.00..1,837.13 rows=57,213 width=39) (actual time=0.270..18.058 rows=57,213 loops=1)

111. 0.000 0.000 ↓ 0.0 0 7,457

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

  • Index Cond: (guiacobrancaoriginal.guibenefic = id)
112. 0.057 100.737 ↑ 8.1 105 1

Hash (cost=135.59..135.59 rows=853 width=72) (actual time=100.737..100.737 rows=105 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
113. 100.680 100.680 ↑ 8.1 105 1

Foreign Scan on operadora_multitenant operadora_multitenant_convenio (cost=100.00..135.59 rows=853 width=72) (actual time=98.481..100.680 rows=105 loops=1)

114. 0.045 0.112 ↑ 1.0 104 1

Hash (cost=4.05..4.05 rows=105 width=24) (actual time=0.112..0.112 rows=104 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 14kB
115. 0.067 0.067 ↑ 1.0 104 1

Seq Scan on fibooperadora operadoraoriginalcobrancaoriginal (cost=0.00..4.05 rows=105 width=24) (actual time=0.015..0.067 rows=104 loops=1)

116. 5.323 18.799 ↑ 1.0 21,004 1

Hash (cost=1,335.04..1,335.04 rows=21,004 width=78) (actual time=18.799..18.799 rows=21,004 loops=1)

  • Buckets: 32768 Batches: 1 Memory Usage: 1652kB
117. 13.476 13.476 ↑ 1.0 21,004 1

Seq Scan on lote_recurso (cost=0.00..1,335.04 rows=21,004 width=78) (actual time=0.012..13.476 rows=21,004 loops=1)

118. 26.092 55.315 ↑ 1.0 87,465 1

Hash (cost=2,514.65..2,514.65 rows=87,465 width=63) (actual time=55.315..55.315 rows=87,465 loops=1)

  • Buckets: 131072 Batches: 1 Memory Usage: 8717kB
119. 29.223 29.223 ↑ 1.0 87,465 1

Seq Scan on sincronia_recursos_aceites_erp (cost=0.00..2,514.65 rows=87,465 width=63) (actual time=0.007..29.223 rows=87,465 loops=1)

120. 0.001 0.004 ↓ 0.0 0 1

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

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

122. 0.032 7.367 ↑ 8.1 105 1

Hash (cost=135.59..135.59 rows=853 width=72) (actual time=7.367..7.367 rows=105 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
123. 7.335 7.335 ↑ 8.1 105 1

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

124.          

SubPlan (for Hash Left Join)

125. 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))
126. 0.101 0.101 ↑ 1.0 565 1

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

  • Filter: (nivel = 'Guia'::text)
  • Rows Removed by Filter: 5
127. 14.914 14.914 ↓ 0.0 0 7,457

Index Only Scan using idx_fiboguia_id_guia_originaria_idx on fiboguia (cost=0.43..8.45 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=7,457)

  • Index Cond: (id_guia_originaria = guiaprestador.id)
  • Heap Fetches: 0
128. 7.457 7.457 ↓ 0.0 0 7,457

Index Only Scan using idx_fiboguia_id_guia_originaria_idx on fiboguia fiboguia_1 (cost=0.43..8.45 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=7,457)

  • Index Cond: (id_guia_originaria = guiaconvenio.id)
  • Heap Fetches: 0
129. 7.457 14.914 ↑ 1.0 1 7,457

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

130. 0.000 7.457 ↓ 0.0 0 7,457

Nested Loop Left Join (cost=1.00..17.08 rows=1 width=89) (actual time=0.001..0.001 rows=0 loops=7,457)

131. 0.000 7.457 ↓ 0.0 0 7,457

Nested Loop Left Join (cost=0.71..16.76 rows=1 width=37) (actual time=0.001..0.001 rows=0 loops=7,457)

132. 7.457 7.457 ↓ 0.0 0 7,457

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

  • Index Cond: (id_guia = guiaconvenio.id)
133. 1.624 1.624 ↑ 1.0 1 7

Index Scan using fiboglosa_pkey on fiboglosa glosas (cost=0.43..8.45 rows=1 width=45) (actual time=0.232..0.232 rows=1 loops=7)

  • Index Cond: (id = glosasguia.elt)
134. 0.035 0.035 ↑ 1.0 1 7

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

  • Index Cond: (id = glosas.glo_motivo)
135. 0.000 7.457 ↑ 1.0 1 7,457

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

136. 7.457 7.457 ↓ 0.0 0 7,457

Index Scan using idx_espelhamento_site_convenio_guia_convenio_id_idx on espelhamento_site_convenio esp (cost=0.42..8.44 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=7,457)

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

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

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

Initplan (for Index Scan)

139. 0.000 0.000 ↓ 0.0 0 7,457

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

  • Index Cond: (guiidguiaprestador = guiarecurso.id)
140. 0.000 14.914 ↑ 1.0 1 7,457

Aggregate (cost=12.41..12.42 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=7,457)

141. 14.914 14.914 ↓ 0.0 0 7,457

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

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

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

Planning time : 30.640 ms
Execution time : 1,553.247 ms