explain.depesz.com

PostgreSQL's explain analyze made readable

Result: rF96 : Optimization for: plan #Wci8

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.042 1,024,985.969 ↑ 4,316.0 1 1

Subquery Scan on final (cost=187,993,053.10..3,398,737,140.85 rows=4,316 width=784) (actual time=1,024,875.794..1,024,985.969 rows=1 loops=1)

  • Buffers: shared hit=8,834,497 read=500,040 dirtied=9,260 written=194, temp read=140,932 written=140,917
2. 421.937 1,024,985.927 ↑ 4,316.0 1 1

Nested Loop Left Join (cost=187,993,053.10..3,398,717,718.85 rows=4,316 width=803) (actual time=1,024,875.754..1,024,985.927 rows=1 loops=1)

  • Buffers: shared hit=8,834,488 read=500,040 dirtied=9,260 written=194, temp read=140,932 written=140,917
3. 0.020 1,024,496.666 ↑ 4,316.0 1 1

Hash Left Join (cost=187,992,961.10..3,398,094,056.85 rows=4,316 width=659) (actual time=1,024,386.494..1,024,496.666 rows=1 loops=1)

  • Hash Cond: (COALESCE(remessa_importada.competencia_id, valor_esperado.competencia_id) = competencia.id)
  • Buffers: shared hit=8,834,341 read=500,010 dirtied=9,260 written=194, temp read=140,932 written=140,917
4. 0.018 1,024,495.684 ↑ 4,316.0 1 1

Hash Join (cost=187,989,335.60..3,398,085,036.35 rows=4,316 width=659) (actual time=1,024,385.514..1,024,495.684 rows=1 loops=1)

  • Hash Cond: (COALESCE(remessa_importada.convenio_id, valor_esperado.convenio_id) = convenio.id)
  • Buffers: shared hit=8,834,318 read=499,993 dirtied=9,260 written=194, temp read=140,932 written=140,917
5. 0.016 1,024,495.219 ↑ 4,316.0 1 1

Hash Join (cost=187,989,013.10..3,398,079,318.85 rows=4,316 width=639) (actual time=1,024,385.050..1,024,495.219 rows=1 loops=1)

  • Hash Cond: (COALESCE(remessa_importada.operadora_id, valor_esperado.operadora_id) = operadora.operadora_id)
  • Buffers: shared hit=8,834,304 read=499,993 dirtied=9,260 written=194, temp read=140,932 written=140,917
6. 0.025 1,024,478.399 ↑ 18,365.0 1 1

Hash Join (cost=187,988,936.60..3,398,063,310.60 rows=18,365 width=639) (actual time=1,024,368.232..1,024,478.399 rows=1 loops=1)

  • Hash Cond: (COALESCE(remessa_importada.hospital_id, valor_esperado.hospital_id) = hospital.id)
  • Buffers: shared hit=8,834,302 read=499,991 dirtied=9,260 written=194, temp read=140,932 written=140,917
7. 0.069 1,024,478.356 ↑ 3,672,942.0 1 1

Hash Full Join (cost=187,988,933.60..3,395,299,418.60 rows=3,672,942 width=593) (actual time=1,024,368.190..1,024,478.356 rows=1 loops=1)

  • Hash Cond: (remessa_importada.entidade_id = valor_esperado.entidade_id)
  • Filter: ((valor_esperado.apos_inicio_pdt OR remessa_importada.apos_inicio_pdt) IS TRUE)
  • Buffers: shared hit=8,834,301 read=499,991 dirtied=9,260 written=194, temp read=140,932 written=140,917
8. 65.691 1,023,647.476 ↑ 26,908.0 1 1

Subquery Scan on remessa_importada (cost=183,204,382.59..3,387,931,699.59 rows=26,908 width=461) (actual time=1,023,537.317..1,023,647.476 rows=1 loops=1)

  • Filter: (remessa_importada.entidade_id = '1074090113231943'::numeric)
  • Rows Removed by Filter: 56,954
  • Buffers: shared hit=8,832,105 read=498,515 dirtied=9,260 written=194, temp read=140,932 written=140,917
9. 11,437.762 1,023,581.785 ↑ 94.5 56,955 1

GroupAggregate (cost=183,204,382.59..3,382,550,125.59 rows=5,381,574 width=485) (actual time=1,012,777.167..1,023,581.785 rows=56,955 loops=1)

  • Group Key: remessa.id, justificativa.id, sistema_de_gestao.hospital_id, convenio_1.id, operadora_1.id, competencia_1.id, rpa.id
  • Buffers: shared hit=8,832,104 read=498,513 dirtied=9,260 written=194, temp read=140,932 written=140,917
10. 5,480.361 1,011,613.333 ↑ 1.8 2,939,762 1

Sort (cost=183,204,382.59..185,895,169.59 rows=5,381,574 width=441) (actual time=1,010,143.181..1,011,613.333 rows=2,939,762 loops=1)

  • Sort Key: remessa.id, justificativa.id, sistema_de_gestao.hospital_id, convenio_1.id, operadora_1.id, competencia_1.id, rpa.id
  • Sort Method: external merge Disk: 565,528kB
  • Buffers: shared hit=7,934,001 read=497,245 dirtied=9,260 written=194, temp read=140,932 written=140,917
11. 812.787 1,006,132.972 ↑ 1.8 2,939,762 1

Nested Loop (cost=48,263,712.00..61,944,342.00 rows=5,381,574 width=441) (actual time=997,872.246..1,006,132.972 rows=2,939,762 loops=1)

  • Join Filter: (remessa.sistema_de_gestao_id = sistema_de_gestao.id)
  • Buffers: shared hit=7,934,001 read=497,245 dirtied=9,260 written=194, temp read=70,228 written=70,213
12. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on sistema_de_gestao (cost=0.00..2.00 rows=1 width=16) (actual time=0.008..0.010 rows=1 loops=1)

  • Buffers: shared hit=1
13. 866.869 1,005,320.175 ↑ 1.8 2,939,762 1

Hash Left Join (cost=48,263,712.00..56,562,766.00 rows=5,381,574 width=433) (actual time=997,872.211..1,005,320.175 rows=2,939,762 loops=1)

  • Hash Cond: ((remessa.rem_numero = justificativa.numero_remessa) AND (remessa.sistema_de_gestao_id = justificativa.sistema_de_gestao_id))
  • Buffers: shared hit=7,934,000 read=497,245 dirtied=9,260 written=194, temp read=70,228 written=70,213
14. 6,585.183 1,004,448.824 ↑ 1.8 2,939,762 1

Hash Right Join (cost=48,263,688.50..48,489,862.00 rows=5,381,574 width=375) (actual time=997,867.678..1,004,448.824 rows=2,939,762 loops=1)

  • Hash Cond: ((rpa.nome_convenio = convenio_1.convnome) AND (rpa.numero_remessa = remessa.rem_numero))
  • Buffers: shared hit=7,934,000 read=497,244 dirtied=9,260 written=194, temp read=70,228 written=70,213
15. 0.011 0.011 ↓ 0.0 0 1

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

16. 3,079.451 997,863.630 ↑ 1.8 2,939,762 1

Hash (cost=39,986,364.50..39,986,364.50 rows=5,381,574 width=179) (actual time=997,863.630..997,863.630 rows=2,939,762 loops=1)

  • Buckets: 1,048,576 Batches: 16 Memory Usage: 47,622kB
  • Buffers: shared hit=7,933,997 read=497,244 dirtied=9,260 written=194, temp written=70,198
17. 1,533.362 994,784.179 ↑ 1.8 2,939,762 1

Hash Left Join (cost=2,106,039.45..39,986,364.50 rows=5,381,574 width=179) (actual time=7,036.145..994,784.179 rows=2,939,762 loops=1)

  • Hash Cond: (guia_convenio.guiprotocolo = protocolo_convenio.id)
  • Buffers: shared hit=7,933,997 read=497,244 dirtied=9,260 written=194
18. 1,908.976 992,564.216 ↑ 1.8 2,939,762 1

Hash Join (cost=243,549.45..31,396,907.00 rows=5,381,574 width=179) (actual time=6,341.584..992,564.216 rows=2,939,762 loops=1)

  • Hash Cond: (guia_prestador.guiremessa = remessa.id)
  • Buffers: shared hit=7,911,969 read=497,244 dirtied=9,260 written=194
19. 4,161.758 990,113.861 ↑ 1.0 5,376,547 1

Merge Right Join (cost=6,574.20..25,600,301.00 rows=5,381,763 width=42) (actual time=315.417..990,113.861 rows=5,376,547 loops=1)

  • Merge Cond: (guia_convenio.id = guia_prestador.guiguiaassoc)
  • Buffers: shared hit=7,911,911 read=495,802 dirtied=9,260 written=194
20. 2,606.777 589,996.000 ↑ 1.0 5,603,566 1

Merge Left Join (cost=6,487.70..9,001,089.00 rows=5,607,269 width=20) (actual time=315.388..589,996.000 rows=5,603,566 loops=1)

  • Merge Cond: (guia_convenio.id = recebimento.convenio_id)
  • Buffers: shared hit=3,769,113 read=246,839 dirtied=4,369 written=9
21. 585,936.339 585,936.339 ↑ 1.0 5,603,566 1

Index Scan using fiboguia_pkey on fiboguia guia_convenio (cost=86.50..6,186,087.00 rows=5,607,269 width=16) (actual time=0.016..585,936.339 rows=5,603,566 loops=1)

  • Buffers: shared hit=3,767,329 read=246,447 dirtied=4,369 written=9
22. 1,452.884 1,452.884 ↑ 1.0 5,507 1

Index Scan using idx_recebimento_convenio_id_idx on recebimento (cost=56.50..5,860.50 rows=5,507 width=12) (actual time=17.531..1,452.884 rows=5,507 loops=1)

  • Buffers: shared hit=1,784 read=392
23. 395,956.103 395,956.103 ↑ 1.0 5,376,547 1

Index Scan using idx_fiboguia_guiguiaassoc_idx on fiboguia guia_prestador (cost=86.50..8,998,139.50 rows=5,381,763 width=30) (actual time=0.022..395,956.103 rows=5,376,547 loops=1)

  • Filter: (discriminador <> 'RECURSO'::text)
  • Rows Removed by Filter: 227,020
  • Buffers: shared hit=4,142,798 read=248,963 dirtied=4,891 written=185
24. 31.636 541.379 ↓ 1.0 56,955 1

Hash (cost=180,021.25..180,021.25 rows=56,954 width=145) (actual time=541.379..541.379 rows=56,955 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 11,612kB
  • Buffers: shared hit=58 read=1,442
25. 15.981 509.743 ↓ 1.0 56,955 1

Hash Join (cost=6,991.25..180,021.25 rows=56,954 width=145) (actual time=1.807..509.743 rows=56,955 loops=1)

  • Hash Cond: (remessa.operadora_id = operadora_1.id)
  • Buffers: shared hit=58 read=1,442
26. 18.444 493.737 ↓ 1.0 56,955 1

Hash Join (cost=6,919.25..108,757.25 rows=56,954 width=145) (actual time=1.772..493.737 rows=56,955 loops=1)

  • Hash Cond: (remessa.remcompetencia = competencia_1.id)
  • Buffers: shared hit=57 read=1,442
27. 473.544 473.544 ↓ 1.0 56,955 1

Seq Scan on fiboremessa remessa (cost=0.00..30,645.50 rows=56,954 width=117) (actual time=0.010..473.544 rows=56,955 loops=1)

  • Filter: ((rem_numero IS NOT NULL) AND (sistema_de_gestao_id IS NOT NULL))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=3 read=1,442
28. 0.436 1.749 ↓ 1.0 2,381 1

Hash (cost=4,542.25..4,542.25 rows=2,377 width=36) (actual time=1.749..1.749 rows=2,381 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 190kB
  • Buffers: shared hit=54
29. 0.870 1.313 ↓ 1.0 2,381 1

Hash Join (cost=322.50..4,542.25 rows=2,377 width=36) (actual time=0.209..1.313 rows=2,381 loops=1)

  • Hash Cond: (competencia_1.comp_convenio = convenio_1.convnome)
  • Buffers: shared hit=54
30. 0.248 0.248 ↓ 1.0 2,381 1

Seq Scan on fibocompetencia competencia_1 (cost=0.00..1,248.50 rows=2,377 width=19) (actual time=0.005..0.248 rows=2,381 loops=1)

  • Buffers: shared hit=40
31. 0.043 0.195 ↑ 1.0 201 1

Hash (cost=121.50..121.50 rows=201 width=28) (actual time=0.195..0.195 rows=201 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 20kB
  • Buffers: shared hit=14
32. 0.152 0.152 ↑ 1.0 201 1

Seq Scan on fiboconvenio convenio_1 (cost=0.00..121.50 rows=201 width=28) (actual time=0.007..0.152 rows=201 loops=1)

  • Buffers: shared hit=14
33. 0.008 0.025 ↑ 1.0 47 1

Hash (cost=25.00..25.00 rows=47 width=8) (actual time=0.025..0.025 rows=47 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared hit=1
34. 0.017 0.017 ↑ 1.0 47 1

Seq Scan on fibooperadora operadora_1 (cost=0.00..25.00 rows=47 width=8) (actual time=0.007..0.017 rows=47 loops=1)

  • Buffers: shared hit=1
35. 364.425 686.601 ↑ 1.0 1,215,974 1

Hash (cost=642,858.00..642,858.00 rows=1,219,632 width=16) (actual time=686.601..686.601 rows=1,215,974 loops=1)

  • Buckets: 2,097,152 Batches: 1 Memory Usage: 71,945kB
  • Buffers: shared hit=22,028
36. 322.176 322.176 ↑ 1.0 1,215,974 1

Seq Scan on fiboprotocolo protocolo_convenio (cost=0.00..642,858.00 rows=1,219,632 width=16) (actual time=0.025..322.176 rows=1,215,974 loops=1)

  • Buffers: shared hit=22,028
37. 0.042 4.482 ↑ 1.0 11 1

Hash (cost=7.00..7.00 rows=11 width=74) (actual time=4.482..4.482 rows=11 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 10kB
  • Buffers: shared read=1
38. 4.440 4.440 ↑ 1.0 11 1

Seq Scan on fibojustifdifvaloresfaturados justificativa (cost=0.00..7.00 rows=11 width=74) (actual time=4.436..4.440 rows=11 loops=1)

  • Buffers: shared read=1
39.          

SubPlan (for GroupAggregate)

40. 56.955 170.865 ↑ 1.0 1 56,955

Aggregate (cost=60.50..61.00 rows=1 width=32) (actual time=0.003..0.003 rows=1 loops=56,955)

  • Buffers: shared hit=114,781 read=4
41. 113.910 113.910 ↓ 0.0 0 56,955

Index Scan using idx_recebimento_remessa_remessa_id_idx on recebimento_remessa lancamentos_manuais_na_remessa (cost=55.00..59.50 rows=1 width=7) (actual time=0.002..0.002 rows=0 loops=56,955)

  • Index Cond: (remessa.id = remessa_id)
  • Buffers: shared hit=114,781 read=4
42. 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.00..58.00 rows=1 width=0) (never executed)

  • Index Cond: (remessa_id = remessa.id)
  • Heap Fetches: 0
43. 9.720 9.720 ↑ 1.0 873 1

Seq Scan on recebimento_remessa lancamentos_manuais_na_remessa_2 (cost=0.00..453.00 rows=873 width=8) (actual time=8.899..9.720 rows=873 loops=1)

  • Buffers: shared read=11
44. 56.955 227.820 ↑ 1.0 1 56,955

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

  • Buffers: shared hit=129,036 read=26
45. 22.206 170.865 ↓ 0.0 0 56,955

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

  • Buffers: shared hit=129,036 read=26
46. 56.955 56.955 ↓ 0.0 0 56,955

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

  • Index Cond: (remessa.id = remessa_id)
  • Buffers: shared hit=117,569 read=16
47. 91.704 91.704 ↑ 1.0 1 3,821

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

  • Index Cond: (id = lancamentos_acrescimos_na_remessa.fato_contabil_id)
  • Filter: (tipo = 'Acrescimo'::text)
  • Rows Removed by Filter: 0
  • Buffers: shared hit=11,467 read=10
48. 56.955 113.910 ↑ 1.0 1 56,955

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

  • Buffers: shared hit=129,062
49. 0.000 56.955 ↓ 0.0 0 56,955

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

  • Buffers: shared hit=129,062
50. 56.955 56.955 ↓ 0.0 0 56,955

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

  • Index Cond: (remessa.id = remessa_id)
  • Buffers: shared hit=117,585
51. 7.642 7.642 ↓ 0.0 0 3,821

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

  • Index Cond: (id = lancamentos_deducoes_na_remessa.fato_contabil_id)
  • Filter: (tipo = 'Deducao'::text)
  • Rows Removed by Filter: 1
  • Buffers: shared hit=11,477
52. 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..59.00 rows=1 width=0) (never executed)

  • Index Cond: (remessa_id = remessa.id)
  • Heap Fetches: 0
53. 8.375 8.375 ↓ 1.0 3,821 1

Seq Scan on lancamento_remessa lancamentos_fatos_contabeis_na_remessa_1 (cost=0.00..1,961.00 rows=3,811 width=8) (actual time=0.005..8.375 rows=3,821 loops=1)

  • Buffers: shared hit=1 read=36
54. 0.005 830.811 ↑ 182.0 1 1

Hash (cost=4,784,369.02..4,784,369.02 rows=182 width=132) (actual time=830.811..830.811 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=2,193 read=1,476
55. 5.607 830.806 ↑ 182.0 1 1

Subquery Scan on valor_esperado (cost=616,663.02..4,784,369.02 rows=182 width=132) (actual time=702.490..830.806 rows=1 loops=1)

  • Filter: (valor_esperado.entidade_id = '1074090113231943'::numeric)
  • Rows Removed by Filter: 36,331
  • Buffers: shared hit=2,193 read=1,476
56. 136.347 825.199 ↑ 1.0 36,332 1

Merge Right Join (cost=616,663.02..4,748,037.02 rows=36,332 width=140) (actual time=679.793..825.199 rows=36,332 loops=1)

  • Merge Cond: ((competencia_2.comp_convenio = (COALESCE(convenio_2.convnome, valor_faturado.convenio_integracao))) AND (competencia_2.comp_desc = valor_faturado.competencia))
  • Buffers: shared hit=2,193 read=1,476
57. 2.508 2.508 ↑ 1.0 2,340 1

Index Scan using fibocompetencia_comp_convenio_comp_desc_unique on fibocompetencia competencia_2 (cost=56.00..2,514.00 rows=2,377 width=27) (actual time=0.135..2.508 rows=2,340 loops=1)

  • Buffers: shared hit=2,156 read=22
58. 80.525 686.344 ↑ 1.0 36,332 1

Sort (cost=616,607.02..634,773.02 rows=36,332 width=131) (actual time=678.263..686.344 rows=36,332 loops=1)

  • Sort Key: (COALESCE(convenio_2.convnome, valor_faturado.convenio_integracao)), valor_faturado.competencia
  • Sort Method: quicksort Memory: 11,187kB
  • Buffers: shared hit=20 read=1,454
59. 15.762 605.819 ↑ 1.0 36,332 1

Hash Join (cost=453.25..66,215.25 rows=36,332 width=131) (actual time=23.726..605.819 rows=36,332 loops=1)

  • Hash Cond: (valor_faturado.id_operadora = operadora_2.id)
  • Buffers: shared hit=15 read=1,454
60. 589.681 589.681 ↑ 1.0 36,332 1

Seq Scan on fibovaloresfaturadoserp valor_faturado (cost=0.00..20,347.00 rows=36,332 width=103) (actual time=23.315..589.681 rows=36,332 loops=1)

  • Filter: (numero_remessa IS NOT NULL)
  • Buffers: shared read=1,454
61. 0.016 0.376 ↑ 1.0 47 1

Hash (cost=406.25..406.25 rows=47 width=36) (actual time=0.376..0.376 rows=47 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 12kB
  • Buffers: shared hit=15
62. 0.043 0.360 ↑ 1.0 47 1

Hash Join (cost=322.50..406.25 rows=47 width=36) (actual time=0.319..0.360 rows=47 loops=1)

  • Hash Cond: (operadora_2.opconvenio = convenio_2.id)
  • Buffers: shared hit=15
63. 0.024 0.024 ↑ 1.0 47 1

Seq Scan on fibooperadora operadora_2 (cost=0.00..25.00 rows=47 width=16) (actual time=0.010..0.024 rows=47 loops=1)

  • Buffers: shared hit=1
64. 0.054 0.293 ↑ 1.0 201 1

Hash (cost=121.50..121.50 rows=201 width=28) (actual time=0.293..0.293 rows=201 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 20kB
  • Buffers: shared hit=14
65. 0.239 0.239 ↑ 1.0 201 1

Seq Scan on fiboconvenio convenio_2 (cost=0.00..121.50 rows=201 width=28) (actual time=0.011..0.239 rows=201 loops=1)

  • Buffers: shared hit=14
66. 0.005 0.018 ↑ 1.0 1 1

Hash (cost=2.00..2.00 rows=1 width=62) (actual time=0.018..0.018 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
  • Buffers: shared hit=1
67. 0.013 0.013 ↑ 1.0 1 1

Seq Scan on fibohospital hospital (cost=0.00..2.00 rows=1 width=62) (actual time=0.013..0.013 rows=1 loops=1)

  • Buffers: shared hit=1
68. 0.022 16.804 ↑ 1.0 47 1

Hash (cost=29.50..29.50 rows=47 width=16) (actual time=16.804..16.804 rows=47 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 11kB
  • Buffers: shared hit=2 read=2
69. 16.782 16.782 ↑ 1.0 47 1

Seq Scan on view_smartdata_operadoras operadora (cost=0.00..29.50 rows=47 width=16) (actual time=16.690..16.782 rows=47 loops=1)

  • Buffers: shared hit=2 read=2
70. 0.090 0.447 ↑ 1.0 201 1

Hash (cost=121.50..121.50 rows=201 width=36) (actual time=0.447..0.447 rows=201 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 22kB
  • Buffers: shared hit=14
71. 0.357 0.357 ↑ 1.0 201 1

Seq Scan on fiboconvenio convenio (cost=0.00..121.50 rows=201 width=36) (actual time=0.013..0.357 rows=201 loops=1)

  • Buffers: shared hit=14
72. 0.355 0.962 ↓ 1.0 2,381 1

Hash (cost=1,248.50..1,248.50 rows=2,377 width=16) (actual time=0.962..0.962 rows=2,381 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 144kB
  • Buffers: shared hit=23 read=17
73. 0.607 0.607 ↓ 1.0 2,381 1

Seq Scan on fibocompetencia competencia (cost=0.00..1,248.50 rows=2,377 width=16) (actual time=0.011..0.607 rows=2,381 loops=1)

  • Buffers: shared hit=23 read=17
74. 0.005 67.324 ↑ 1.0 1 1

Result (cost=92.00..92.50 rows=1 width=1) (actual time=67.323..67.324 rows=1 loops=1)

  • Buffers: shared hit=2 read=6
75.          

Initplan (for Result)

76. 67.319 67.319 ↑ 1.0 1 1

Index Scan using idx_fiboarquivo_numero_remessa_idx on fiboarquivo arquivo (cost=85.50..92.00 rows=1 width=0) (actual time=67.319..67.319 rows=1 loops=1)

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