explain.depesz.com

PostgreSQL's explain analyze made readable

Result: e3He

Settings
# exclusive inclusive rows x rows loops node
1. 0.082 815,194.759 ↑ 12,008.8 5 1

Subquery Scan on final (cost=2,983,443,872.33..5,127,933,418.58 rows=60,044 width=782) (actual time=815,118.987..815,194.759 rows=5 loops=1)

  • Buffers: shared hit=7,036,619 read=416,973 dirtied=108 written=19, temp read=117,448 written=117,441
2. 164.343 815,194.677 ↑ 12,008.8 5 1

Nested Loop Left Join (cost=2,983,443,872.33..5,127,663,220.58 rows=60,044 width=801) (actual time=815,118.935..815,194.677 rows=5 loops=1)

  • Buffers: shared hit=7,036,610 read=416,973 dirtied=108 written=19, temp read=117,448 written=117,441
3. 0.047 814,864.379 ↑ 12,008.8 5 1

Hash Left Join (cost=2,983,443,780.83..5,119,016,884.58 rows=60,044 width=657) (actual time=814,861.067..814,864.379 rows=5 loops=1)

  • Hash Cond: (COALESCE(remessa_importada.competencia_id, valor_esperado.competencia_id) = competencia.id)
  • Buffers: shared hit=7,036,437 read=416,952 dirtied=108 written=19, temp read=117,448 written=117,441
4. 0.066 814,863.245 ↑ 12,008.8 5 1

Hash Join (cost=2,983,440,011.33..5,118,938,060.08 rows=60,044 width=657) (actual time=814,859.948..814,863.245 rows=5 loops=1)

  • Hash Cond: (COALESCE(remessa_importada.convenio_id, valor_esperado.convenio_id) = convenio.id)
  • Buffers: shared hit=7,036,396 read=416,952 dirtied=108 written=19, temp read=117,448 written=117,441
5. 0.032 814,862.883 ↑ 12,008.8 5 1

Hash Join (cost=2,983,439,682.83..5,118,862,676.58 rows=60,044 width=637) (actual time=814,859.628..814,862.883 rows=5 loops=1)

  • Hash Cond: (COALESCE(remessa_importada.operadora_id, valor_esperado.operadora_id) = operadora.operadora_id)
  • Buffers: shared hit=7,036,381 read=416,952 dirtied=108 written=19, temp read=117,448 written=117,441
6. 0.044 814,862.770 ↑ 28,937.0 5 1

Hash Join (cost=2,983,439,550.83..5,118,724,008.83 rows=144,685 width=637) (actual time=814,859.532..814,862.770 rows=5 loops=1)

  • Hash Cond: (COALESCE(remessa_importada.hospital_id, valor_esperado.hospital_id) = hospital.id)
  • Buffers: shared hit=7,036,376 read=416,952 dirtied=108 written=19, temp read=117,448 written=117,441
7. 36.451 814,862.716 ↑ 2,893,703.6 5 1

Merge Full Join (cost=2,983,439,546.33..5,107,800,273.33 rows=14,468,518 width=596) (actual time=814,859.496..814,862.716 rows=5 loops=1)

  • Merge Cond: (valor_esperado.entidade_id = remessa_importada.entidade_id)
  • Filter: (((valor_esperado.apos_inicio_pdt OR remessa_importada.apos_inicio_pdt) IS TRUE) AND (COALESCE(valor_esperado.entidade_id, remessa_importada.entidade_id) = ANY ('{1580888133262266,1580888133276336,1580888133277549,1580888133282385,1580888133320563}'::numeric[])))
  • Rows Removed by Filter: 57,120
  • Buffers: shared hit=7,036,375 read=416,952 dirtied=108 written=19, temp read=117,448 written=117,441
8. 38.687 722.304 ↑ 1.0 33,880 1

Sort (cost=4,951,845.14..4,968,785.14 rows=33,880 width=132) (actual time=711.567..722.304 rows=33,880 loops=1)

  • Sort Key: valor_esperado.entidade_id
  • Sort Method: quicksort Memory: 10,536kB
  • Buffers: shared hit=2,377 read=1,317
9. 6.405 683.617 ↑ 1.0 33,880 1

Subquery Scan on valor_esperado (cost=571,712.45..4,442,013.95 rows=33,880 width=132) (actual time=525.833..683.617 rows=33,880 loops=1)

  • Buffers: shared hit=2,373 read=1,317
10. 140.874 677.212 ↑ 1.0 33,880 1

Merge Right Join (cost=571,712.45..4,425,073.95 rows=33,880 width=140) (actual time=525.831..677.212 rows=33,880 loops=1)

  • Merge Cond: ((competencia_1.comp_convenio = (COALESCE(convenio_1.convnome, valor_faturado.convenio_integracao))) AND (competencia_1.comp_desc = valor_faturado.competencia))
  • Buffers: shared hit=2,373 read=1,317
11. 3.142 3.142 ↑ 1.0 2,453 1

Index Scan using fibocompetencia_comp_convenio_comp_desc_unique on fibocompetencia competencia_1 (cost=56.00..2,610.50 rows=2,472 width=27) (actual time=0.012..3.142 rows=2,453 loops=1)

  • Buffers: shared hit=2,334
12. 99.805 533.196 ↑ 1.0 33,880 1

Sort (cost=571,656.45..588,596.45 rows=33,880 width=132) (actual time=523.845..533.196 rows=33,880 loops=1)

  • Sort Key: (COALESCE(convenio_1.convnome, valor_faturado.convenio_integracao)), valor_faturado.competencia
  • Sort Method: quicksort Memory: 10,536kB
  • Buffers: shared hit=23 read=1,316
13. 15.177 433.391 ↑ 1.0 33,880 1

Hash Join (cost=558.25..61,825.25 rows=33,880 width=132) (actual time=9.784..433.391 rows=33,880 loops=1)

  • Hash Cond: (valor_faturado.id_operadora = operadora_1.id)
  • Buffers: shared hit=18 read=1,316
14. 417.941 417.941 ↑ 1.0 33,880 1

Seq Scan on fibovaloresfaturadoserp valor_faturado (cost=0.00..18,917.00 rows=33,880 width=104) (actual time=9.497..417.941 rows=33,880 loops=1)

  • Filter: (numero_remessa IS NOT NULL)
  • Buffers: shared hit=2 read=1,316
15. 0.017 0.273 ↑ 1.0 83 1

Hash (cost=475.25..475.25 rows=83 width=36) (actual time=0.273..0.273 rows=83 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 14kB
  • Buffers: shared hit=16
16. 0.031 0.256 ↑ 1.0 83 1

Hash Join (cost=328.50..475.25 rows=83 width=36) (actual time=0.219..0.256 rows=83 loops=1)

  • Hash Cond: (operadora_1.opconvenio = convenio_1.id)
  • Buffers: shared hit=16
17. 0.021 0.021 ↑ 1.0 83 1

Seq Scan on fibooperadora operadora_1 (cost=0.00..43.00 rows=83 width=16) (actual time=0.005..0.021 rows=83 loops=1)

  • Buffers: shared hit=1
18. 0.052 0.204 ↑ 1.0 204 1

Hash (cost=124.50..124.50 rows=204 width=28) (actual time=0.204..0.204 rows=204 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 20kB
  • Buffers: shared hit=15
19. 0.152 0.152 ↑ 1.0 204 1

Seq Scan on fiboconvenio convenio_1 (cost=0.00..124.50 rows=204 width=28) (actual time=0.005..0.152 rows=204 loops=1)

  • Buffers: shared hit=15
20. 7.553 814,103.961 ↑ 80.2 56,799 1

Materialize (cost=2,978,487,701.19..2,983,042,921.19 rows=4,555,220 width=464) (actual time=814,081.409..814,103.961 rows=56,799 loops=1)

  • Buffers: shared hit=7,033,995 read=415,635 dirtied=108 written=19, temp read=117,448 written=117,441
21. 107.970 814,096.408 ↑ 80.2 56,799 1

Sort (cost=2,978,487,701.19..2,980,765,311.19 rows=4,555,220 width=464) (actual time=814,081.398..814,096.408 rows=56,799 loops=1)

  • Sort Key: remessa_importada.entidade_id
  • Sort Method: quicksort Memory: 16,624kB
  • Buffers: shared hit=7,033,995 read=415,635 dirtied=108 written=19, temp read=117,448 written=117,441
22. 25.451 813,988.438 ↑ 80.2 56,799 1

Subquery Scan on remessa_importada (cost=155,172,365.22..2,876,916,315.22 rows=4,555,220 width=464) (actual time=804,957.306..813,988.438 rows=56,799 loops=1)

  • Buffers: shared hit=7,033,995 read=415,635 dirtied=108 written=19, temp read=117,448 written=117,441
23. 8,293.341 813,962.987 ↑ 80.2 56,799 1

GroupAggregate (cost=155,172,365.22..2,874,638,705.22 rows=4,555,220 width=488) (actual time=804,957.303..813,962.987 rows=56,799 loops=1)

  • Group Key: remessa.id, justificativa.id, sistema_de_gestao.hospital_id, convenio_2.id, operadora_2.id, competencia_2.id, rpa.id
  • Buffers: shared hit=7,033,995 read=415,635 dirtied=108 written=19, temp read=117,448 written=117,441
24. 3,972.520 805,116.193 ↑ 1.8 2,529,636 1

Sort (cost=155,172,365.22..157,449,975.22 rows=4,555,220 width=444) (actual time=804,089.938..805,116.193 rows=2,529,636 loops=1)

  • Sort Key: remessa.id, justificativa.id, sistema_de_gestao.hospital_id, convenio_2.id, operadora_2.id, competencia_2.id, rpa.id
  • Sort Method: external merge Disk: 487,672kB
  • Buffers: shared hit=6,215,080 read=414,916 dirtied=108 written=19, temp read=117,448 written=117,441
25. 728.447 801,143.673 ↑ 1.8 2,529,636 1

Hash Left Join (cost=40,909,155.25..53,627,670.25 rows=4,555,220 width=444) (actual time=795,149.127..801,143.673 rows=2,529,636 loops=1)

  • Hash Cond: ((remessa.rem_numero = justificativa.numero_remessa) AND (remessa.sistema_de_gestao_id = justificativa.sistema_de_gestao_id))
  • Buffers: shared hit=6,215,080 read=414,916 dirtied=108 written=19, temp read=56,478 written=56,471
26. 846.161 800,390.219 ↑ 1.8 2,529,636 1

Hash Join (cost=40,909,141.75..46,794,588.75 rows=4,555,220 width=384) (actual time=795,124.077..800,390.219 rows=2,529,636 loops=1)

  • Hash Cond: (remessa.sistema_de_gestao_id = sistema_de_gestao.id)
  • Buffers: shared hit=6,215,080 read=414,915 dirtied=108 written=19, temp read=56,478 written=56,471
27. 4,424.149 799,544.042 ↑ 1.8 2,529,636 1

Hash Right Join (cost=40,909,135.75..41,100,637.75 rows=4,555,220 width=376) (actual time=795,124.027..799,544.042 rows=2,529,636 loops=1)

  • Hash Cond: ((rpa.nome_convenio = convenio_2.convnome) AND (rpa.numero_remessa = remessa.rem_numero))
  • Buffers: shared hit=6,215,079 read=414,915 dirtied=108 written=19, temp read=56,478 written=56,471
28. 0.006 0.006 ↓ 0.0 0 1

Seq Scan on detalhes_quitacao_rpa rpa (cost=0.00..125.00 rows=220 width=272) (actual time=0.006..0.006 rows=0 loops=1)

29. 2,567.558 795,119.887 ↑ 1.8 2,529,636 1

Hash (cost=33,902,815.75..33,902,815.75 rows=4,555,220 width=180) (actual time=795,119.887..795,119.887 rows=2,529,636 loops=1)

  • Buckets: 1,048,576 Batches: 8 Memory Usage: 77,515kB
  • Buffers: shared hit=6,215,076 read=414,915 dirtied=108 written=19, temp written=56,464
30. 1,404.263 792,552.329 ↑ 1.8 2,529,636 1

Hash Left Join (cost=1,830,098.60..33,902,815.75 rows=4,555,220 width=180) (actual time=6,751.173..792,552.329 rows=2,529,636 loops=1)

  • Hash Cond: (guia_convenio.guiprotocolo = protocolo_convenio.id)
  • Buffers: shared hit=6,215,076 read=414,915 dirtied=108 written=19
31. 1,679.093 790,558.143 ↑ 1.8 2,529,636 1

Hash Join (cost=243,461.60..26,622,153.75 rows=4,555,220 width=180) (actual time=6,156.709..790,558.143 rows=2,529,636 loops=1)

  • Hash Cond: (guia_prestador.guiremessa = remessa.id)
  • Buffers: shared hit=6,196,381 read=414,915 dirtied=108 written=19
32. 3,550.822 788,770.530 ↑ 1.0 4,553,125 1

Merge Right Join (cost=6,667.60..21,659,336.50 rows=4,555,541 width=42) (actual time=17.947..788,770.530 rows=4,553,125 loops=1)

  • Merge Cond: (guia_convenio.id = guia_prestador.guiguiaassoc)
  • Buffers: shared hit=6,194,799 read=414,915 dirtied=108 written=19
33. 2,290.455 439,564.312 ↓ 1.0 4,757,267 1

Merge Left Join (cost=6,541.18..7,622,393.00 rows=4,757,116 width=20) (actual time=17.918..439,564.312 rows=4,757,267 loops=1)

  • Merge Cond: (guia_convenio.id = recebimento.convenio_id)
  • Buffers: shared hit=2,789,363 read=202,524 dirtied=38 written=16
34. 436,944.769 436,944.769 ↓ 1.0 4,757,267 1

Index Scan using fiboguia_pkey on fiboguia guia_convenio (cost=86.50..5,232,032.00 rows=4,757,116 width=16) (actual time=0.035..436,944.769 rows=4,757,267 loops=1)

  • Buffers: shared hit=2,787,355 read=202,342 dirtied=38 written=16
35. 329.088 329.088 ↓ 1.0 5,734 1

Index Scan using idx_recebimento_convenio_id_idx on recebimento (cost=56.50..6,076.00 rows=5,727 width=12) (actual time=0.147..329.088 rows=5,734 loops=1)

  • Buffers: shared hit=2,008 read=182
36. 345,655.396 345,655.396 ↑ 1.0 4,553,125 1

Index Scan using idx_fiboguia_guiguiaassoc_idx on fiboguia guia_prestador (cost=86.50..7,618,213.00 rows=4,555,541 width=30) (actual time=0.023..345,655.396 rows=4,553,125 loops=1)

  • Filter: (discriminador <> 'RECURSO'::text)
  • Rows Removed by Filter: 204,224
  • Buffers: shared hit=3,405,436 read=212,391 dirtied=70 written=3
37. 35.434 108.520 ↓ 1.0 56,799 1

Hash (cost=179,996.00..179,996.00 rows=56,798 width=146) (actual time=108.520..108.520 rows=56,799 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 11,708kB
  • Buffers: shared hit=1,582
38. 17.544 73.086 ↓ 1.0 56,799 1

Hash Join (cost=7,314.00..179,996.00 rows=56,798 width=146) (actual time=2.206..73.086 rows=56,799 loops=1)

  • Hash Cond: (remessa.operadora_id = operadora_2.id)
  • Buffers: shared hit=1,582
39. 20.491 55.510 ↓ 1.0 56,799 1

Hash Join (cost=7,188.00..108,873.50 rows=56,798 width=146) (actual time=2.161..55.510 rows=56,799 loops=1)

  • Hash Cond: (remessa.remcompetencia = competencia_2.id)
  • Buffers: shared hit=1,581
40. 32.892 32.892 ↓ 1.0 56,800 1

Seq Scan on fiboremessa remessa (cost=0.00..30,688.50 rows=56,798 width=118) (actual time=0.021..32.892 rows=56,800 loops=1)

  • Filter: ((rem_numero IS NOT NULL) AND (sistema_de_gestao_id IS NOT NULL))
  • Rows Removed by Filter: 2
  • Buffers: shared hit=1,525
41. 0.591 2.127 ↓ 1.0 2,481 1

Hash (cost=4,716.00..4,716.00 rows=2,472 width=36) (actual time=2.127..2.127 rows=2,481 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 197kB
  • Buffers: shared hit=56
42. 1.060 1.536 ↓ 1.0 2,481 1

Hash Join (cost=328.50..4,716.00 rows=2,472 width=36) (actual time=0.215..1.536 rows=2,481 loops=1)

  • Hash Cond: (competencia_2.comp_convenio = convenio_2.convnome)
  • Buffers: shared hit=56
43. 0.275 0.275 ↓ 1.0 2,481 1

Seq Scan on fibocompetencia competencia_2 (cost=0.00..1,297.50 rows=2,472 width=19) (actual time=0.004..0.275 rows=2,481 loops=1)

  • Buffers: shared hit=41
44. 0.050 0.201 ↑ 1.0 204 1

Hash (cost=124.50..124.50 rows=204 width=28) (actual time=0.201..0.201 rows=204 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 20kB
  • Buffers: shared hit=15
45. 0.151 0.151 ↑ 1.0 204 1

Seq Scan on fiboconvenio convenio_2 (cost=0.00..124.50 rows=204 width=28) (actual time=0.006..0.151 rows=204 loops=1)

  • Buffers: shared hit=15
46. 0.009 0.032 ↑ 1.0 83 1

Hash (cost=43.00..43.00 rows=83 width=8) (actual time=0.032..0.032 rows=83 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
  • Buffers: shared hit=1
47. 0.023 0.023 ↑ 1.0 83 1

Seq Scan on fibooperadora operadora_2 (cost=0.00..43.00 rows=83 width=8) (actual time=0.007..0.023 rows=83 loops=1)

  • Buffers: shared hit=1
48. 312.513 589.923 ↓ 1.0 1,040,436 1

Hash (cost=547,574.00..547,574.00 rows=1,039,063 width=16) (actual time=589.923..589.923 rows=1,040,436 loops=1)

  • Buckets: 1,048,576 Batches: 1 Memory Usage: 55,653kB
  • Buffers: shared hit=18,695
49. 277.410 277.410 ↓ 1.0 1,040,436 1

Seq Scan on fiboprotocolo protocolo_convenio (cost=0.00..547,574.00 rows=1,039,063 width=16) (actual time=0.026..277.410 rows=1,040,436 loops=1)

  • Buffers: shared hit=18,695
50. 0.004 0.016 ↑ 1.0 3 1

Hash (cost=3.00..3.00 rows=3 width=16) (actual time=0.015..0.016 rows=3 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
51. 0.012 0.012 ↑ 1.0 3 1

Seq Scan on sistema_de_gestao (cost=0.00..3.00 rows=3 width=16) (actual time=0.011..0.012 rows=3 loops=1)

  • Buffers: shared hit=1
52. 0.015 25.007 ↑ 1.0 6 1

Hash (cost=4.50..4.50 rows=6 width=76) (actual time=25.007..25.007 rows=6 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared read=1
53. 24.992 24.992 ↑ 1.0 6 1

Seq Scan on fibojustifdifvaloresfaturados justificativa (cost=0.00..4.50 rows=6 width=76) (actual time=24.991..24.992 rows=6 loops=1)

  • Buffers: shared read=1
54.          

SubPlan (for GroupAggregate)

55. 56.799 170.397 ↑ 1.0 1 56,799

Aggregate (cost=61.00..61.50 rows=1 width=32) (actual time=0.002..0.003 rows=1 loops=56,799)

  • Buffers: shared hit=114,668 read=4
56. 113.598 113.598 ↓ 0.0 0 56,799

Index Scan using idx_recebimento_remessa_remessa_id_idx on recebimento_remessa lancamentos_manuais_na_remessa (cost=55.50..60.00 rows=1 width=7) (actual time=0.002..0.002 rows=0 loops=56,799)

  • Index Cond: (remessa.id = remessa_id)
  • Buffers: shared hit=114,668 read=4
57. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_recebimento_remessa_remessa_id_idx on recebimento_remessa lancamentos_manuais_na_remessa_1 (cost=55.50..58.50 rows=1 width=0) (never executed)

  • Index Cond: (remessa_id = remessa.id)
  • Heap Fetches: 0
58. 55.271 55.271 ↑ 1.0 1,061 1

Seq Scan on recebimento_remessa lancamentos_manuais_na_remessa_2 (cost=0.00..550.00 rows=1,061 width=8) (actual time=33.054..55.271 rows=1,061 loops=1)

  • Buffers: shared read=13
59. 56.799 170.397 ↑ 1.0 1 56,799

Aggregate (cost=122.50..123.00 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=56,799)

  • Buffers: shared hit=129,072 read=26
60. 15.241 113.598 ↓ 0.0 0 56,799

Nested Loop (cost=111.50..121.50 rows=1 width=7) (actual time=0.002..0.002 rows=0 loops=56,799)

  • Buffers: shared hit=129,072 read=26
61. 56.799 56.799 ↓ 0.0 0 56,799

Index Scan using lancamento_remessa_remessa_id_fato_contabil_id_unique on lancamento_remessa lancamentos_acrescimos_na_remessa (cost=56.00..60.50 rows=1 width=15) (actual time=0.001..0.001 rows=0 loops=56,799)

  • Index Cond: (remessa.id = remessa_id)
  • Buffers: shared hit=117,735 read=17
62. 41.558 41.558 ↑ 1.0 1 3,778

Index Scan using fato_contabil_pkey on fato_contabil (cost=55.50..60.50 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=3,778)

  • Index Cond: (id = lancamentos_acrescimos_na_remessa.fato_contabil_id)
  • Filter: (tipo = 'Acrescimo'::text)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=11,337 read=9
63. 56.799 113.598 ↑ 1.0 1 56,799

Aggregate (cost=122.50..123.00 rows=1 width=32) (actual time=0.002..0.002 rows=1 loops=56,799)

  • Buffers: shared hit=129,098
64. 0.000 56.799 ↓ 0.0 0 56,799

Nested Loop (cost=111.50..121.50 rows=1 width=7) (actual time=0.001..0.001 rows=0 loops=56,799)

  • Buffers: shared hit=129,098
65. 56.799 56.799 ↓ 0.0 0 56,799

Index Scan using lancamento_remessa_remessa_id_fato_contabil_id_unique on lancamento_remessa lancamentos_deducoes_na_remessa (cost=56.00..60.50 rows=1 width=15) (actual time=0.001..0.001 rows=0 loops=56,799)

  • Index Cond: (remessa.id = remessa_id)
  • Buffers: shared hit=117,752
66. 7.556 7.556 ↓ 0.0 0 3,778

Index Scan using fato_contabil_pkey on fato_contabil fato_contabil_1 (cost=55.50..60.50 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=3,778)

  • Index Cond: (id = lancamentos_deducoes_na_remessa.fato_contabil_id)
  • Filter: (tipo = 'Deducao'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=11,346
67. 0.000 0.000 ↓ 0.0 0

Index Only Scan using idx_lancamento_remessa_remessa_id_idx on lancamento_remessa lancamentos_fatos_contabeis_na_remessa (cost=56.00..60.50 rows=1 width=0) (never executed)

  • Index Cond: (remessa_id = remessa.id)
  • Heap Fetches: 0
68. 43.790 43.790 ↓ 1.0 3,778 1

Seq Scan on lancamento_remessa lancamentos_fatos_contabeis_na_remessa_1 (cost=0.00..1,942.50 rows=3,777 width=8) (actual time=0.006..43.790 rows=3,778 loops=1)

  • Buffers: shared hit=2 read=34
69. 0.001 0.010 ↑ 1.0 2 1

Hash (cost=2.50..2.50 rows=2 width=57) (actual time=0.010..0.010 rows=2 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
70. 0.009 0.009 ↑ 1.0 2 1

Seq Scan on fibohospital hospital (cost=0.00..2.50 rows=2 width=57) (actual time=0.008..0.009 rows=2 loops=1)

  • Buffers: shared hit=1
71. 0.010 0.081 ↑ 1.0 83 1

Hash (cost=49.00..49.00 rows=83 width=16) (actual time=0.081..0.081 rows=83 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
  • Buffers: shared hit=5
72. 0.071 0.071 ↑ 1.0 83 1

Seq Scan on view_smartdata_operadoras operadora (cost=0.00..49.00 rows=83 width=16) (actual time=0.014..0.071 rows=83 loops=1)

  • Buffers: shared hit=5
73. 0.052 0.296 ↑ 1.0 204 1

Hash (cost=124.50..124.50 rows=204 width=36) (actual time=0.296..0.296 rows=204 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 22kB
  • Buffers: shared hit=15
74. 0.244 0.244 ↑ 1.0 204 1

Seq Scan on fiboconvenio convenio (cost=0.00..124.50 rows=204 width=36) (actual time=0.024..0.244 rows=204 loops=1)

  • Buffers: shared hit=15
75. 0.438 1.087 ↓ 1.0 2,481 1

Hash (cost=1,297.50..1,297.50 rows=2,472 width=16) (actual time=1.087..1.087 rows=2,481 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 149kB
  • Buffers: shared hit=41
76. 0.649 0.649 ↓ 1.0 2,481 1

Seq Scan on fibocompetencia competencia (cost=0.00..1,297.50 rows=2,472 width=16) (actual time=0.015..0.649 rows=2,481 loops=1)

  • Buffers: shared hit=41
77. 0.035 165.955 ↑ 1.0 1 5

Result (cost=91.50..92.00 rows=1 width=1) (actual time=33.190..33.191 rows=1 loops=5)

  • Buffers: shared hit=15 read=9
78.          

Initplan (for Result)

79. 165.920 165.920 ↑ 1.0 1 5

Index Scan using idx_fiboarquivo_numero_remessa_idx on fiboarquivo arquivo (cost=85.00..91.50 rows=1 width=0) (actual time=33.184..33.184 rows=1 loops=5)

  • Index Cond: (COALESCE($9, $10) = numero_remessa)
  • Filter: ((cnpj_hospital = $11) AND (lower(metadado_nome_convenio) = lower($12)))
  • Buffers: shared hit=15 read=9