explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Go45

Settings
# exclusive inclusive rows x rows loops node
1. 0.063 11,881.196 ↓ 5.9 100 1

Limit (cost=63,603.84..63,603.88 rows=17 width=3,051) (actual time=11,881.123..11,881.196 rows=100 loops=1)

2. 4.554 11,881.133 ↓ 5.9 100 1

Sort (cost=63,603.84..63,603.88 rows=17 width=3,051) (actual time=11,881.121..11,881.133 rows=100 loops=1)

  • Sort Key: (COALESCE(round(((sum(produtosinterno.valorprodutoconvenio) - sum(produtosinterno.valorprodutoprestador))), 4), '0'::numeric))
  • Sort Method: top-N heapsort Memory: 226kB
3. 13.551 11,876.579 ↓ 77.7 1,321 1

WindowAgg (cost=61,949.03..63,603.32 rows=17 width=3,051) (actual time=11,871.401..11,876.579 rows=1,321 loops=1)

4. 26.525 11,863.028 ↓ 77.7 1,321 1

Hash Right Join (cost=61,949.03..63,601.92 rows=17 width=2,649) (actual time=11,823.708..11,863.028 rows=1,321 loops=1)

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

Initplan (forHash Right Join)

6. 0.030 0.030 ↑ 1.0 1 1

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

  • Filter: ((cc_tipo = 'HOSPITAL'::text) AND (ccnome = 'permitirAceiteComProdutoRecursado'::text))
  • Rows Removed by Filter: 91
7. 7.072 7.072 ↑ 8.1 105 1

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

8. 4.066 11,816.029 ↓ 330.2 1,321 1

Hash (cost=61,844.60..61,844.60 rows=4 width=1,997) (actual time=11,816.029..11,816.029 rows=1,321 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1369kB
9. 0.628 11,811.963 ↓ 330.2 1,321 1

Nested Loop Left Join (cost=61,802.64..61,844.60 rows=4 width=1,997) (actual time=11,793.453..11,811.963 rows=1,321 loops=1)

10. 1.596 11,810.014 ↓ 330.2 1,321 1

Nested Loop Left Join (cost=61,802.49..61,843.90 rows=4 width=1,957) (actual time=11,793.442..11,810.014 rows=1,321 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))
11. 0.825 11,799.171 ↓ 330.2 1,321 1

Nested Loop Left Join (cost=61,802.20..61,842.55 rows=4 width=1,922) (actual time=11,793.379..11,799.171 rows=1,321 loops=1)

12. 1.261 11,797.025 ↓ 330.2 1,321 1

Nested Loop Left Join (cost=61,801.91..61,841.28 rows=4 width=1,852) (actual time=11,793.373..11,797.025 rows=1,321 loops=1)

13. 2.459 11,795.764 ↓ 330.2 1,321 1

Hash Right Join (cost=61,801.77..61,840.60 rows=4 width=1,836) (actual time=11,793.363..11,795.764 rows=1,321 loops=1)

  • Hash Cond: (operadora_multitenant_convenio.id = operadoraoriginalconvenio.id_multitenant)
14. 7.192 7.192 ↑ 8.1 105 1

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

15. 20.197 11,786.113 ↓ 1,321.0 1,321 1

Hash (cost=61,701.76..61,701.76 rows=1 width=1,780) (actual time=11,786.113..11,786.113 rows=1,321 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 1357kB
16. 3.687 11,765.916 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,627.98..61,701.76 rows=1 width=1,780) (actual time=1,470.258..11,765.916 rows=1,321 loops=1)

17. 3.562 11,762.229 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,627.56..61,701.29 rows=1 width=1,763) (actual time=1,470.254..11,762.229 rows=1,321 loops=1)

18. 3.668 11,758.667 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,627.27..61,700.96 rows=1 width=1,740) (actual time=1,470.249..11,758.667 rows=1,321 loops=1)

19. 4.620 11,754.999 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,626.84..61,700.29 rows=1 width=1,670) (actual time=1,470.244..11,754.999 rows=1,321 loops=1)

20. 3.755 11,742.453 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,626.56..61,699.99 rows=1 width=1,666) (actual time=1,470.231..11,742.453 rows=1,321 loops=1)

21. 3.424 11,738.698 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,626.42..61,699.82 rows=1 width=1,650) (actual time=1,470.226..11,738.698 rows=1,321 loops=1)

22. 3.893 11,735.274 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,626.14..61,699.51 rows=1 width=1,617) (actual time=1,470.222..11,735.274 rows=1,321 loops=1)

23. 4.558 11,727.418 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,626.02..61,699.36 rows=1 width=1,574) (actual time=1,470.215..11,727.418 rows=1,321 loops=1)

24. 3.437 11,712.292 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,625.59..61,698.88 rows=1 width=1,540) (actual time=1,470.191..11,712.292 rows=1,321 loops=1)

25. 4.558 11,703.571 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,625.46..61,698.72 rows=1 width=1,527) (actual time=1,470.181..11,703.571 rows=1,321 loops=1)

26. 4.129 11,692.408 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,625.32..61,698.56 rows=1 width=1,514) (actual time=1,470.160..11,692.408 rows=1,321 loops=1)

27. 3.363 11,676.390 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,625.19..61,698.39 rows=1 width=1,498) (actual time=1,470.131..11,676.390 rows=1,321 loops=1)

28. 3.314 11,673.027 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,624.91..61,698.09 rows=1 width=1,455) (actual time=1,470.127..11,673.027 rows=1,321 loops=1)

29. 3.786 11,661.787 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,624.64..61,697.79 rows=1 width=1,437) (actual time=1,470.114..11,661.787 rows=1,321 loops=1)

30. 3.594 11,646.112 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,624.21..61,697.32 rows=1 width=1,405) (actual time=1,470.098..11,646.112 rows=1,321 loops=1)

31. 5.016 11,642.518 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,623.79..61,696.64 rows=1 width=1,407) (actual time=1,470.094..11,642.518 rows=1,321 loops=1)

32. 3.775 11,628.255 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,623.36..61,695.97 rows=1 width=1,383) (actual time=1,470.075..11,628.255 rows=1,321 loops=1)

33. 3.478 11,619.196 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,623.23..61,695.82 rows=1 width=1,340) (actual time=1,470.065..11,619.196 rows=1,321 loops=1)

34. 13.924 11,603.829 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,622.81..61,695.34 rows=1 width=1,340) (actual time=1,470.048..11,603.829 rows=1,321 loops=1)

  • Filter: (COALESCE(guiaprestador.guistatusanaliseglosa, guiaconvenio.guistatusanaliseglosa) = ANY ('{ProntaParaAnalise,EmAnalise,Analisada,ComPendencia}'::text[]))
35. 3,014.850 11,566.127 ↓ 330.2 1,321 1

Nested Loop Left Join (cost=61,622.38..61,661.50 rows=4 width=1,001) (actual time=1,470.002..11,566.127 rows=1,321 loops=1)

36. 3.508 1,288.419 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,522.21..61,522.46 rows=1 width=929) (actual time=1,218.559..1,288.419 rows=1,321 loops=1)

  • Join Filter: (competenciaprestador.comp_convenio = detalhes_quitacao_rpa.nome_convenio)
37. 2.475 1,267.738 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,521.93..61,522.11 rows=1 width=918) (actual time=1,218.547..1,267.738 rows=1,321 loops=1)

38. 3.547 1,263.942 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,521.51..61,521.66 rows=1 width=896) (actual time=1,218.539..1,263.942 rows=1,321 loops=1)

39. 5.635 1,260.395 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,521.23..61,521.35 rows=1 width=863) (actual time=1,218.537..1,260.395 rows=1,321 loops=1)

40. 10.207 1,233.624 ↓ 1,321.0 1,321 1

Merge Left Join (cost=61,521.10..61,521.19 rows=1 width=850) (actual time=1,218.531..1,233.624 rows=1,321 loops=1)

  • Merge Cond: (guiaprestador.guistatusanaliseglosa = statusprestadoranalise.stcodigo)
41. 5.491 1,221.685 ↓ 1,321.0 1,321 1

Sort (cost=61,519.65..61,519.66 rows=1 width=837) (actual time=1,218.500..1,221.685 rows=1,321 loops=1)

  • Sort Key: guiaprestador.guistatusanaliseglosa
  • Sort Method: quicksort Memory: 1310kB
42. 1.328 1,216.194 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,494.78..61,519.64 rows=1 width=837) (actual time=657.574..1,216.194 rows=1,321 loops=1)

43. 0.660 1,213.545 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,494.64..61,519.48 rows=1 width=821) (actual time=657.570..1,213.545 rows=1,321 loops=1)

44. 0.925 1,210.243 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,494.50..61,519.31 rows=1 width=805) (actual time=657.562..1,210.243 rows=1,321 loops=1)

45. 1.280 1,209.318 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,494.23..61,519.01 rows=1 width=762) (actual time=657.560..1,209.318 rows=1,321 loops=1)

46. 0.343 1,206.717 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,493.95..61,518.71 rows=1 width=744) (actual time=657.555..1,206.717 rows=1,321 loops=1)

47. 1.433 1,203.732 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,493.66..61,518.39 rows=1 width=694) (actual time=657.549..1,203.732 rows=1,321 loops=1)

48. 2.056 1,199.657 ↓ 1,321.0 1,321 1

Nested Loop Left Join (cost=61,493.24..61,517.91 rows=1 width=641) (actual time=657.541..1,199.657 rows=1,321 loops=1)

49. 15.781 1,194.959 ↓ 1,321.0 1,321 1

GroupAggregate (cost=61,492.81..61,509.45 rows=1 width=217) (actual time=657.531..1,194.959 rows=1,321 loops=1)

  • Group Key: produtosinterno.idguiaprestador, produtosinterno.idguiaconvenio, produtosinterno.protocolo_ultimo_pagamento
50. 8.130 658.168 ↓ 11,578.0 11,578 1

Sort (cost=61,492.81..61,492.82 rows=1 width=110) (actual time=656.595..658.168 rows=11,578 loops=1)

  • Sort Key: produtosinterno.idguiaprestador, produtosinterno.idguiaconvenio, produtosinterno.protocolo_ultimo_pagamento
  • Sort Method: quicksort Memory: 2013kB
51. 2.946 650.038 ↓ 11,578.0 11,578 1

Subquery Scan on produtosinterno (cost=119.25..61,492.80 rows=1 width=110) (actual time=7.590..650.038 rows=11,578 loops=1)

52. 50.135 647.092 ↓ 11,578.0 11,578 1

Nested Loop Left Join (cost=119.25..61,492.79 rows=1 width=1,193) (actual time=7.590..647.092 rows=11,578 loops=1)

53. 5.173 249.617 ↓ 11,578.0 11,578 1

Nested Loop Left Join (cost=118.96..61,473.28 rows=1 width=174) (actual time=7.464..249.617 rows=11,578 loops=1)

54. 1.664 221.288 ↓ 11,578.0 11,578 1

Nested Loop (cost=118.53..61,471.14 rows=1 width=160) (actual time=7.456..221.288 rows=11,578 loops=1)

55. 1.577 196.468 ↓ 11,578.0 11,578 1

Nested Loop (cost=118.26..61,462.83 rows=1 width=168) (actual time=7.449..196.468 rows=11,578 loops=1)

56. 29.622 160.157 ↓ 57.9 11,578 1

Nested Loop (cost=117.83..61,029.83 rows=200 width=152) (actual time=7.439..160.157 rows=11,578 loops=1)

57. 18.082 58.135 ↓ 60.2 36,200 1

Nested Loop (cost=117.39..59,574.59 rows=601 width=98) (actual time=7.403..58.135 rows=36,200 loops=1)

58. 0.443 17.346 ↓ 74.2 2,523 1

Nested Loop (cost=116.95..3,156.51 rows=34 width=25) (actual time=7.359..17.346 rows=2,523 loops=1)

59. 0.043 0.067 ↑ 1.0 23 1

Bitmap Heap Scan on fibocompetencia competenciaprestador_1 (cost=4.45..17.74 rows=23 width=8) (actual time=0.033..0.067 rows=23 loops=1)

  • Recheck Cond: (comp_convenio = 'Cassi'::text)
  • Heap Blocks: exact=12
60. 0.024 0.024 ↑ 1.0 23 1

Bitmap Index Scan on idx_fibocompetencia_comp_convenio_idx (cost=0.00..4.45 rows=23 width=0) (actual time=0.024..0.024 rows=23 loops=1)

  • Index Cond: (comp_convenio = 'Cassi'::text)
61. 3.059 16.836 ↓ 55.0 110 23

Bitmap Heap Scan on fiboguia guiaprestador_1 (cost=112.50..136.45 rows=2 width=33) (actual time=0.636..0.732 rows=110 loops=23)

  • Recheck Cond: ((guicompetencia = competenciaprestador_1.id) AND (guicompetenciaassoc = '361824259'::bigint))
  • Filter: ((discriminador <> 'CONVENIO'::text) AND (guiorigem = 'HOSPITAL'::text))
  • Rows Removed by Filter: 82
  • Heap Blocks: exact=901
62. 0.851 13.777 ↓ 0.0 0 23

BitmapAnd (cost=112.50..112.50 rows=6 width=0) (actual time=0.599..0.599 rows=0 loops=23)

63. 5.589 5.589 ↓ 1.8 3,185 23

Bitmap Index Scan on idx_fiboguia_guicompetencia_idx (cost=0.00..33.41 rows=1,754 width=0) (actual time=0.243..0.243 rows=3,185 loops=23)

  • Index Cond: (guicompetencia = competenciaprestador_1.id)
64. 7.337 7.337 ↓ 1.1 4,414 23

Bitmap Index Scan on idx_fiboguia_guicompetenciaassoc_idx (cost=0.00..78.54 rows=4,015 width=0) (actual time=0.319..0.319 rows=4,414 loops=23)

  • Index Cond: (guicompetenciaassoc = '361824259'::bigint)
65. 22.707 22.707 ↑ 48.2 14 2,523

Index Scan using idx_fiboproduto_prodguia_idx on fiboproduto produtoprestador (cost=0.44..1,652.61 rows=675 width=81) (actual time=0.004..0.009 rows=14 loops=2,523)

  • Index Cond: (prodguia = guiaprestador_1.id)
66. 72.400 72.400 ↓ 0.0 0 36,200

Index Scan using fiboproduto_pkey on fiboproduto produtoconvenio (cost=0.44..2.41 rows=1 width=62) (actual time=0.002..0.002 rows=0 loops=36,200)

  • Index Cond: (id = produtoprestador.prodassoc)
  • Filter: ((COALESCE(prodvlrtotal, '0'::numeric) - COALESCE(produtoprestador.prodvlrtotal, '0'::numeric)) < '0'::numeric)
  • Rows Removed by Filter: 1
67. 34.734 34.734 ↑ 1.0 1 11,578

Index Scan using fiboguia_pkey on fiboguia guiaconvenio_1 (cost=0.43..2.15 rows=1 width=24) (actual time=0.002..0.003 rows=1 loops=11,578)

  • Index Cond: (id = produtoconvenio.prodguia)
  • Filter: ((guicompetencia = '361824259'::bigint) AND (guiorigem = 'CONVENIO'::text))
68. 23.156 23.156 ↑ 1.0 1 11,578

Index Scan using fibocompetencia_pkey on fibocompetencia competenciaconvenio_1 (cost=0.28..8.29 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=11,578)

  • Index Cond: (id = '361824259'::bigint)
  • Filter: (comp_convenio = 'Cassi'::text)
69. 23.156 23.156 ↓ 0.0 0 11,578

Index Scan using idx_fiborecurso_rec_produto_idx on fiborecurso recursoproduto (cost=0.42..2.14 rows=1 width=30) (actual time=0.002..0.002 rows=0 loops=11,578)

  • Index Cond: (produtoprestador.id = rec_produto)
70. 11.578 11.578 ↓ 0.0 0 11,578

Index Only Scan using registro_envio_recurso_pkey on registro_envio_recurso registro_envio_item (cost=0.29..1.99 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=11,578)

  • Index Cond: (id = produtoprestador.registro_envio_recurso_id)
  • Heap Fetches: 4741
71.          

SubPlan (forNested Loop Left Join)

72. 243.138 335.762 ↑ 1.0 1 11,578

Aggregate (cost=17.48..17.49 rows=1 width=32) (actual time=0.029..0.029 rows=1 loops=11,578)

73. 0.000 92.624 ↑ 1.0 1 11,578

Nested Loop Left Join (cost=1.15..17.22 rows=1 width=98) (actual time=0.007..0.008 rows=1 loops=11,578)

74. 22.670 69.468 ↑ 1.0 1 11,578

Nested Loop Left Join (cost=0.85..16.90 rows=1 width=38) (actual time=0.005..0.006 rows=1 loops=11,578)

75. 23.156 23.156 ↑ 1.0 1 11,578

Index Scan using idx_fiboglosasproduto_id_produto_idx on fiboglosasproduto glosasproduto (cost=0.43..8.45 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=11,578)

  • Index Cond: (id_produto = produtoconvenio.id)
76. 23.642 23.642 ↑ 1.0 1 11,821

Index Scan using fiboglosa_pkey on fiboglosa glosas_1 (cost=0.43..8.45 rows=1 width=46) (actual time=0.002..0.002 rows=1 loops=11,821)

  • Index Cond: (id = glosasproduto.elt)
77. 23.642 23.642 ↑ 1.0 1 11,821

Index Scan using fibomotivoglosa_pkey on fibomotivoglosa motivo_1 (cost=0.29..0.31 rows=1 width=68) (actual time=0.002..0.002 rows=1 loops=11,821)

  • Index Cond: (id = glosas_1.glo_motivo)
78.          

SubPlan (forGroupAggregate)

79. 11.578 521.010 ↑ 1.0 1 11,578

Result (cost=16.55..16.56 rows=1 width=1) (actual time=0.045..0.045 rows=1 loops=11,578)

80.          

Initplan (forResult)

81. 509.432 509.432 ↓ 0.0 0 11,578

Seq Scan on anexo_recurso anexo_recurso_2 (cost=0.00..16.55 rows=1 width=0) (actual time=0.044..0.044 rows=0 loops=11,578)

  • Filter: ((entidade_id = produtosinterno.idprodutoprestador) AND (nivel = 'Produto'::text))
  • Rows Removed by Filter: 570
82. 2.642 2.642 ↑ 1.0 1 1,321

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

  • Index Cond: (produtosinterno.idguiaprestador = id)
83. 2.642 2.642 ↑ 1.0 1 1,321

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

  • Index Cond: (guiaprestador.guibenefic = id)
84. 2.642 2.642 ↑ 1.0 1 1,321

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

  • Index Cond: (guiaprestador.guiremessa = id)
85. 1.321 1.321 ↑ 1.0 1 1,321

Index Scan using fibocompetencia_pkey on fibocompetencia competenciaprestador (cost=0.28..0.29 rows=1 width=26) (actual time=0.001..0.001 rows=1 loops=1,321)

  • Index Cond: (guiaprestador.guicompetencia = id)
86. 0.000 0.000 ↓ 0.0 0 1,321

Index Scan using fibodefinicaomotivoglosa_pkey on fibodefinicaomotivoglosa motivoglosaprestador (cost=0.28..0.29 rows=1 width=59) (actual time=0.000..0.000 rows=0 loops=1,321)

  • Index Cond: (guiaprestador.guimotglosa = id)
87. 2.642 2.642 ↑ 1.0 1 1,321

Index Scan using fibosituacaoguia_pkey on fibosituacaoguia situacaoinicialprestador (cost=0.14..0.16 rows=1 width=30) (actual time=0.002..0.002 rows=1 loops=1,321)

  • Index Cond: (guiaprestador.guisituacaoguia = sitcodigo)
88. 1.321 1.321 ↑ 1.0 1 1,321

Index Scan using fibosituacaoguia_pkey on fibosituacaoguia situacaoassociacaoprestador (cost=0.14..0.16 rows=1 width=30) (actual time=0.001..0.001 rows=1 loops=1,321)

  • Index Cond: (guiaprestador.guisituacaoguiaassoc = sitcodigo)
89. 1.726 1.732 ↓ 88.8 1,332 1

Sort (cost=1.44..1.48 rows=15 width=25) (actual time=0.026..1.732 rows=1,332 loops=1)

  • Sort Key: statusprestadoranalise.stcodigo
  • Sort Method: quicksort Memory: 26kB
90. 0.006 0.006 ↑ 1.0 15 1

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

91. 21.136 21.136 ↑ 1.0 1 1,321

Index Scan using fibostatustrabalho_pkey on fibostatusguia statusprestadorconciliacao (cost=0.14..0.15 rows=1 width=25) (actual time=0.013..0.016 rows=1 loops=1,321)

  • Index Cond: (guiaprestador.guistatusconciliacao = stcodigo)
92. 0.000 0.000 ↓ 0.0 0 1,321

Index Scan using fiboprestador_pkey on fiboprestador prestadororiginalprestador (cost=0.28..0.30 rows=1 width=41) (actual time=0.000..0.000 rows=0 loops=1,321)

  • Index Cond: (guiaprestador.guiprestoriginal = id)
93. 1.321 1.321 ↓ 0.0 0 1,321

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=1,321)

  • Index Cond: (guiaprestador.gui_quitacao_sistema_gestao = id)
94. 17.173 17.173 ↓ 0.0 0 1,321

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.012..0.013 rows=0 loops=1,321)

  • Index Cond: (remessa.rem_numero = numero_remessa)
95. 67.371 7,262.858 ↑ 4.0 1 1,321

Hash Right Join (cost=100.17..139.00 rows=4 width=80) (actual time=3.497..5.498 rows=1 loops=1,321)

  • Hash Cond: (operadora_multitenant_prestador.id = operadoraoriginalprestador.id_multitenant)
96. 7,169.067 7,169.067 ↑ 8.1 105 1,321

Foreign Scan on operadora_multitenant operadora_multitenant_prestador (cost=100.00..135.59 rows=853 width=72) (actual time=3.427..5.427 rows=105 loops=1,321)

97. 6.605 26.420 ↑ 1.0 1 1,321

Hash (cost=0.16..0.16 rows=1 width=24) (actual time=0.020..0.020 rows=1 loops=1,321)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
98. 19.815 19.815 ↑ 1.0 1 1,321

Index Scan using fibooperadora_pkey on fibooperadora operadoraoriginalprestador (cost=0.14..0.16 rows=1 width=24) (actual time=0.013..0.015 rows=1 loops=1,321)

  • Index Cond: (guiaprestador.guioperadoraoriginal = id)
99. 23.778 23.778 ↑ 1.0 1 1,321

Index Scan using fiboguia_pkey on fiboguia guiaconvenio (cost=0.43..8.45 rows=1 width=347) (actual time=0.017..0.018 rows=1 loops=1,321)

  • Index Cond: (produtosinterno.idguiaconvenio = id)
100. 11.889 11.889 ↑ 1.0 1 1,321

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocoloprestador (cost=0.42..0.46 rows=1 width=16) (actual time=0.008..0.009 rows=1 loops=1,321)

  • Index Cond: (guiaprestador.guiprotocolo = id)
101. 5.284 5.284 ↑ 1.0 1 1,321

Index Scan using fibohospital_pkey on fibohospital hospitalprestador (cost=0.12..0.14 rows=1 width=51) (actual time=0.004..0.004 rows=1 loops=1,321)

  • Index Cond: (protocoloprestador.hospital = id)
102. 9.247 9.247 ↓ 0.0 0 1,321

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

  • Index Cond: (guiaprestador.id = guiidguiaprestador)
103. 0.000 0.000 ↓ 0.0 0 1,321

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=1,321)

  • Index Cond: (id = guiarecurso.guiguiaassoc)
104. 11.889 11.889 ↑ 1.0 1 1,321

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

  • Index Cond: (guiaconvenio.guibenefic = id)
105. 7.926 7.926 ↑ 1.0 1 1,321

Index Scan using fibocompetencia_pkey on fibocompetencia competenciaconvenio (cost=0.28..0.29 rows=1 width=26) (actual time=0.005..0.006 rows=1 loops=1,321)

  • Index Cond: (guiaconvenio.guicompetencia = id)
106. 0.000 0.000 ↓ 0.0 0 1,321

Index Scan using fibodefinicaomotivoglosa_pkey on fibodefinicaomotivoglosa motivoglosaconvenio (cost=0.28..0.29 rows=1 width=59) (actual time=0.000..0.000 rows=0 loops=1,321)

  • Index Cond: (guiaconvenio.guimotglosa = id)
107. 11.889 11.889 ↑ 1.0 1 1,321

Index Scan using fibosituacaoguia_pkey on fibosituacaoguia situacaoconvenio (cost=0.14..0.16 rows=1 width=30) (actual time=0.008..0.009 rows=1 loops=1,321)

  • Index Cond: (guiaconvenio.guisituacaoguia = sitcodigo)
108. 6.605 6.605 ↑ 1.0 1 1,321

Index Scan using fibostatustrabalho_pkey on fibostatusguia statusconvenioconciliacao (cost=0.14..0.15 rows=1 width=25) (actual time=0.005..0.005 rows=1 loops=1,321)

  • Index Cond: (guiaconvenio.guistatusconciliacao = stcodigo)
109. 5.284 5.284 ↑ 1.0 1 1,321

Index Scan using fibostatustrabalho_pkey on fibostatusguia statusconvenioanalise (cost=0.14..0.15 rows=1 width=25) (actual time=0.004..0.004 rows=1 loops=1,321)

  • Index Cond: (guiaprestador.guistatusanaliseglosa = stcodigo)
110. 10.568 10.568 ↑ 1.0 1 1,321

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocoloconvenio (cost=0.42..0.46 rows=1 width=50) (actual time=0.007..0.008 rows=1 loops=1,321)

  • Index Cond: (guiaconvenio.guiprotocolo = id)
111. 3.963 3.963 ↑ 1.0 1 1,321

Index Scan using fibohospital_pkey on fibohospital hospitalconvenio (cost=0.12..0.14 rows=1 width=51) (actual time=0.003..0.003 rows=1 loops=1,321)

  • Index Cond: (protocoloconvenio.hospital = id)
112. 0.000 0.000 ↓ 0.0 0 1,321

Index Scan using fiboprestador_pkey on fiboprestador prestadororiginalconvenio (cost=0.28..0.30 rows=1 width=41) (actual time=0.000..0.000 rows=0 loops=1,321)

  • Index Cond: (guiaconvenio.guiprestoriginal = id)
113. 0.000 0.000 ↓ 0.0 0 1,321

Index Scan using fibooperadora_pkey on fibooperadora operadoraoriginalconvenio (cost=0.14..0.16 rows=1 width=24) (actual time=0.000..0.000 rows=0 loops=1,321)

  • Index Cond: (guiaconvenio.guioperadoraoriginal = id)
114. 7.926 7.926 ↑ 1.0 1 1,321

Index Scan using recebimento_pkey on recebimento (cost=0.28..0.30 rows=1 width=12) (actual time=0.005..0.006 rows=1 loops=1,321)

  • Index Cond: (guiaconvenio.recebimento_id = id)
115. 0.000 0.000 ↓ 0.0 0 1,321

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=1,321)

  • Index Cond: (guiaconvenio.guicobrancaoriginal = id)
116. 0.000 0.000 ↓ 0.0 0 1,321

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=1,321)

  • Index Cond: (guiacobrancaoriginal.guiremessa = id)
117. 0.000 0.000 ↓ 0.0 0 1,321

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=1,321)

  • Index Cond: (guiacobrancaoriginal.guibenefic = id)
118. 0.000 0.000 ↓ 0.0 0 1,321

Index Scan using fibooperadora_pkey on fibooperadora operadoraoriginalcobrancaoriginal (cost=0.14..0.16 rows=1 width=24) (actual time=0.000..0.000 rows=0 loops=1,321)

  • Index Cond: (guiacobrancaoriginal.guioperadoraoriginal = id)
119. 1.321 1.321 ↓ 0.0 0 1,321

Index Scan using id_lote_recurso_pkey on lote_recurso (cost=0.29..0.31 rows=1 width=78) (actual time=0.001..0.001 rows=0 loops=1,321)

  • Index Cond: (guiaprestador.id_lote_recurso = id)
120. 9.247 9.247 ↑ 1.0 1 1,321

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.007..0.007 rows=1 loops=1,321)

  • 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
121. 1.321 1.321 ↓ 0.0 0 1,321

Index Scan using idx_pendencia_guia_id_idx on pendencia (cost=0.15..0.17 rows=1 width=48) (actual time=0.001..0.001 rows=0 loops=1,321)

  • Index Cond: (guia_id = guiaprestador.id)
122.          

SubPlan (forHash Right Join)

123. 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))
124. 0.158 0.158 ↑ 1.0 565 1

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

  • Filter: (nivel = 'Guia'::text)
  • Rows Removed by Filter: 5
125. 2.642 2.642 ↓ 0.0 0 1,321

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=1,321)

  • Index Cond: (id_guia_originaria = guiaprestador.id)
  • Heap Fetches: 0
126. 1.321 1.321 ↓ 0.0 0 1,321

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=1,321)

  • Index Cond: (id_guia_originaria = guiaconvenio.id)
  • Heap Fetches: 0
127. 1.321 3.963 ↑ 1.0 1 1,321

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

128. 0.000 2.642 ↓ 0.0 0 1,321

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

129. 1.321 2.642 ↓ 0.0 0 1,321

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

130. 1.321 1.321 ↓ 0.0 0 1,321

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=1,321)

  • Index Cond: (id_guia = guiaconvenio.id)
131. 0.000 0.000 ↓ 0.0 0

Index Scan using fiboglosa_pkey on fiboglosa glosas (cost=0.43..8.45 rows=1 width=46) (never executed)

  • Index Cond: (id = glosasguia.elt)
132. 0.000 0.000 ↓ 0.0 0

Index Scan using fibomotivoglosa_pkey on fibomotivoglosa motivo (cost=0.29..0.31 rows=1 width=68) (never executed)

  • Index Cond: (id = glosas.glo_motivo)
133. 0.000 2.642 ↑ 1.0 1 1,321

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

134. 2.642 2.642 ↓ 0.0 0 1,321

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=1,321)

  • Index Cond: (guia_convenio_id = guiaconvenio.id)
135. 0.000 0.000 ↓ 0.0 0 1,321

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=1,321)

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

Initplan (forIndex Scan)

137. 1.321 1.321 ↓ 0.0 0 1,321

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

  • Index Cond: (guiidguiaprestador = guiarecurso.id)
138. 0.000 2.642 ↑ 1.0 1 1,321

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

139. 2.642 2.642 ↓ 0.0 0 1,321

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=1,321)

  • Index Cond: (guicobrancaoriginal = guiaprestador.id)
  • Filter: (guisituacaoguia = 'PosAuditoria'::text)
140. 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
141. 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 : 41.002 ms
Execution time : 11,975.047 ms