explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BTUV

Settings
# exclusive inclusive rows x rows loops node
1. 0.032 108.794 ↑ 1.0 50 1

Limit (cost=93.72..119,046.81 rows=50 width=1,596) (actual time=18.855..108.794 rows=50 loops=1)

2. 0.226 108.762 ↑ 114.8 50 1

Subquery Scan on dados_guias (cost=93.72..13,653,529.15 rows=5,739 width=1,596) (actual time=18.854..108.762 rows=50 loops=1)

3. 4.860 108.536 ↑ 114.8 50 1

Nested Loop Left Join (cost=93.72..13,653,270.89 rows=5,739 width=1,623) (actual time=18.839..108.536 rows=50 loops=1)

4. 0.069 50.026 ↑ 114.8 50 1

Nested Loop Left Join (cost=80.13..12,888,215.82 rows=5,739 width=1,175) (actual time=10.928..50.026 rows=50 loops=1)

5. 0.079 36.557 ↑ 114.8 50 1

Nested Loop Left Join (cost=64.87..12,800,495.21 rows=5,739 width=1,155) (actual time=8.825..36.557 rows=50 loops=1)

6. 0.055 22.878 ↑ 114.8 50 1

Nested Loop Left Join (cost=49.61..12,712,731.55 rows=5,739 width=1,091) (actual time=6.362..22.878 rows=50 loops=1)

7. 0.025 4.823 ↑ 114.8 50 1

Nested Loop Left Join (cost=35.20..12,629,831.70 rows=5,739 width=1,051) (actual time=0.276..4.823 rows=50 loops=1)

8. 0.076 4.748 ↑ 114.8 50 1

Nested Loop Left Join (cost=34.92..12,628,080.14 rows=5,739 width=1,047) (actual time=0.261..4.748 rows=50 loops=1)

  • Join Filter: (protocolo_prestador.hospital = hospital.id)
9. 0.042 4.672 ↑ 114.8 50 1

Nested Loop Left Join (cost=34.92..12,627,993.05 rows=5,739 width=977) (actual time=0.250..4.672 rows=50 loops=1)

10. 0.087 4.580 ↑ 114.8 50 1

Nested Loop Left Join (cost=34.50..12,623,425.59 rows=5,739 width=977) (actual time=0.243..4.580 rows=50 loops=1)

11. 0.066 4.343 ↑ 114.8 50 1

Nested Loop Left Join (cost=34.07..12,618,858.13 rows=5,739 width=977) (actual time=0.237..4.343 rows=50 loops=1)

12. 0.025 4.127 ↑ 114.8 50 1

Nested Loop Left Join (cost=33.65..12,616,021.33 rows=5,739 width=969) (actual time=0.231..4.127 rows=50 loops=1)

13. 0.026 4.052 ↑ 114.8 50 1

Nested Loop Left Join (cost=33.23..12,613,299.59 rows=5,739 width=950) (actual time=0.223..4.052 rows=50 loops=1)

14. 0.026 3.976 ↑ 114.8 50 1

Nested Loop Left Join (cost=32.81..12,610,589.61 rows=5,739 width=897) (actual time=0.212..3.976 rows=50 loops=1)

15. 0.056 3.900 ↑ 114.8 50 1

Nested Loop Left Join (cost=32.53..12,608,853.23 rows=5,739 width=889) (actual time=0.206..3.900 rows=50 loops=1)

  • Join Filter: (remessa.rem_numero = sincronia.remessa)
  • Rows Removed by Join Filter: 2
16. 0.069 3.394 ↑ 114.8 50 1

Nested Loop (cost=32.24..12,606,911.54 rows=5,739 width=847) (actual time=0.185..3.394 rows=50 loops=1)

  • Join Filter: (guia_prestador.guioperadoraoriginal = operadoraoriginal_prestador.operadora_id)
17. 0.069 3.275 ↑ 13,892.0 50 1

Merge Join (cost=32.24..12,596,486.23 rows=694,601 width=839) (actual time=0.143..3.275 rows=50 loops=1)

  • Merge Cond: (remessa.id = guia_prestador.guiremessa)
18. 0.027 0.027 ↑ 9,535.5 6 1

Index Scan using fiboremessa_pkey on fiboremessa remessa (cost=0.29..4,764.37 rows=57,213 width=41) (actual time=0.008..0.027 rows=6 loops=1)

19. 0.141 3.179 ↑ 13,892.0 50 1

Materialize (cost=31.78..22,991,425.85 rows=694,601 width=806) (actual time=0.131..3.179 rows=50 loops=1)

20. 0.048 3.038 ↑ 13,892.0 50 1

Nested Loop Left Join (cost=31.78..22,989,689.35 rows=694,601 width=806) (actual time=0.126..3.038 rows=50 loops=1)

21. 0.024 2.740 ↑ 13,892.0 50 1

Nested Loop Left Join (cost=31.36..22,648,946.90 rows=694,601 width=753) (actual time=0.107..2.740 rows=50 loops=1)

22. 0.036 2.666 ↑ 13,892.0 50 1

Nested Loop Left Join (cost=31.21..22,527,347.72 rows=694,601 width=617) (actual time=0.105..2.666 rows=50 loops=1)

23. 0.050 1.630 ↑ 13,892.0 50 1

Nested Loop Left Join (cost=30.79..22,208,041.78 rows=694,601 width=565) (actual time=0.104..1.630 rows=50 loops=1)

24. 0.064 1.580 ↑ 13,892.0 50 1

Nested Loop Left Join (cost=30.50..21,984,502.46 rows=694,601 width=545) (actual time=0.102..1.580 rows=50 loops=1)

25. 0.061 1.516 ↑ 13,892.0 50 1

Nested Loop Left Join (cost=30.21..21,763,108.15 rows=694,601 width=525) (actual time=0.096..1.516 rows=50 loops=1)

26. 0.020 1.455 ↑ 13,892.0 50 1

Nested Loop Left Join (cost=29.79..21,429,443.34 rows=694,601 width=525) (actual time=0.087..1.455 rows=50 loops=1)

27. 0.033 1.385 ↑ 13,892.0 50 1

Nested Loop Left Join (cost=29.36..20,960,190.20 rows=694,601 width=511) (actual time=0.068..1.385 rows=50 loops=1)

28. 0.051 1.252 ↑ 13,892.0 50 1

Nested Loop Left Join (cost=28.94..20,367,466.75 rows=694,601 width=466) (actual time=0.062..1.252 rows=50 loops=1)

29. 0.061 1.201 ↑ 13,892.0 50 1

Nested Loop Left Join (cost=28.66..20,155,567.46 rows=694,601 width=441) (actual time=0.061..1.201 rows=50 loops=1)

30. 0.065 0.840 ↑ 13,892.0 50 1

Nested Loop Left Join (cost=1.27..1,112,947.36 rows=694,601 width=433) (actual time=0.052..0.840 rows=50 loops=1)

31. 0.098 0.725 ↑ 13,892.0 50 1

Nested Loop (cost=0.84..520,223.91 rows=694,601 width=308) (actual time=0.035..0.725 rows=50 loops=1)

32. 0.108 0.427 ↑ 13,892.0 50 1

Nested Loop (cost=0.70..371,001.47 rows=694,601 width=271) (actual time=0.021..0.427 rows=50 loops=1)

33. 0.169 0.169 ↑ 13,892.0 50 1

Index Scan using idx_fiboguia_guiremessa_idx on fiboguia guia_prestador (cost=0.43..160,812.67 rows=694,601 width=253) (actual time=0.009..0.169 rows=50 loops=1)

  • Filter: (guiorigem = 'HOSPITAL'::text)
34. 0.150 0.150 ↑ 1.0 1 50

Index Scan using fibocompetencia_pkey on fibocompetencia competencia_prestador (cost=0.28..0.29 rows=1 width=26) (actual time=0.003..0.003 rows=1 loops=50)

  • Index Cond: (id = guia_prestador.guicompetencia)
35. 0.200 0.200 ↑ 1.0 1 50

Index Scan using fiboconvenio_convnome_unique on fiboconvenio convenio (cost=0.14..0.20 rows=1 width=47) (actual time=0.003..0.004 rows=1 loops=50)

  • Index Cond: (convnome = competencia_prestador.comp_convenio)
36. 0.050 0.050 ↓ 0.0 0 50

Index Scan using fiboguia_pkey on fiboguia guia_convenio (cost=0.43..0.84 rows=1 width=133) (actual time=0.001..0.001 rows=0 loops=50)

  • Index Cond: (guia_prestador.guiguiaassoc = id)
37. 0.050 0.300 ↑ 1.0 1 50

Aggregate (cost=27.39..27.40 rows=1 width=8) (actual time=0.006..0.006 rows=1 loops=50)

38. 0.035 0.250 ↓ 0.0 0 50

Nested Loop (cost=0.85..27.38 rows=2 width=8) (actual time=0.005..0.005 rows=0 loops=50)

39. 0.150 0.150 ↓ 0.0 0 50

Index Scan using idx_fiboguia_guicobrancaoriginal_idx on fiboguia guia_pagamento_vinculada (cost=0.43..10.48 rows=2 width=8) (actual time=0.003..0.003 rows=0 loops=50)

  • Index Cond: (guia_prestador.id = guicobrancaoriginal)
40. 0.065 0.065 ↑ 1.0 1 5

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocolo_pagamento (cost=0.42..8.44 rows=1 width=16) (actual time=0.012..0.013 rows=1 loops=5)

  • Index Cond: (id = guia_pagamento_vinculada.guiprotocolo)
41. 0.000 0.000 ↓ 0.0 0 50

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

  • Index Cond: (guia_convenio.guiprestoriginal = id)
42. 0.100 0.100 ↓ 0.0 0 50

Index Scan using idx_fiboguia_guiidguiaprestador_idx on fiboguia guia_recurso (cost=0.43..0.84 rows=1 width=53) (actual time=0.002..0.002 rows=0 loops=50)

  • Index Cond: (guia_prestador.id = guiidguiaprestador)
43. 0.050 0.050 ↓ 0.0 0 50

Index Scan using fiboguia_pkey on fiboguia guia_pagamento_recurso (cost=0.43..0.67 rows=1 width=30) (actual time=0.000..0.001 rows=0 loops=50)

  • Index Cond: (id = guia_recurso.guiguiaassoc)
  • Filter: (guistatusconciliacao = 'Fechada'::text)
44. 0.000 0.000 ↓ 0.0 0 50

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocolo_pagamento_recurso (cost=0.42..0.47 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=50)

  • Index Cond: (id = guia_pagamento_recurso.guiprotocolo)
45. 0.000 0.000 ↓ 0.0 0 50

Index Scan using id_lote_recurso_pkey on lote_recurso (cost=0.29..0.31 rows=1 width=28) (actual time=0.000..0.000 rows=0 loops=50)

  • Index Cond: (id = guia_recurso.id_lote_recurso)
46. 0.000 0.000 ↓ 0.0 0 50

Index Scan using id_lote_recurso_pkey on lote_recurso lote_recurso_se_guia_for_de_recurso (cost=0.29..0.31 rows=1 width=28) (actual time=0.000..0.000 rows=0 loops=50)

  • Index Cond: (id = guia_prestador.id_lote_recurso)
47. 1.000 1.000 ↑ 1.0 1 50

Index Scan using quitacao_sistema_gestao_pkey on quitacao_sistema_gestao (cost=0.42..0.45 rows=1 width=60) (actual time=0.014..0.020 rows=1 loops=50)

  • Index Cond: (guia_prestador.gui_quitacao_sistema_gestao = id)
48. 0.050 0.050 ↓ 0.0 0 50

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

  • Index Cond: (guia_id = guia_prestador.id)
49. 0.250 0.250 ↑ 1.0 1 50

Index Scan using fibobeneficiario_pkey on fibobeneficiario beneficiario_prestador (cost=0.42..0.48 rows=1 width=69) (actual time=0.004..0.005 rows=1 loops=50)

  • Index Cond: (guia_prestador.guibenefic = id)
50. 0.007 0.050 ↑ 1.0 1 50

Materialize (cost=0.00..6.30 rows=1 width=16) (actual time=0.001..0.001 rows=1 loops=50)

51. 0.043 0.043 ↑ 1.0 1 1

Seq Scan on view_smartdata_operadoras operadoraoriginal_prestador (cost=0.00..6.30 rows=1 width=16) (actual time=0.039..0.043 rows=1 loops=1)

  • Filter: (operadora_grupo_id = 40838)
  • Rows Removed by Filter: 103
52. 0.450 0.450 ↓ 0.0 0 50

Index Scan using idx_sincronia_recursos_aceites_erp_numero_conta_idx on sincronia_recursos_aceites_erp sincronia (cost=0.29..0.33 rows=1 width=58) (actual time=0.009..0.009 rows=0 loops=50)

  • Index Cond: (guia_prestador.guinumconta = numero_conta)
  • Filter: CASE WHEN (guia_de_recurso IS TRUE) THEN (guia_prestador.discriminador = 'RECURSO'::text) ELSE (guia_prestador.discriminador = 'PRESTADOR'::text) END
  • Rows Removed by Filter: 0
53. 0.050 0.050 ↓ 0.0 0 50

Index Scan using fibocompetencia_pkey on fibocompetencia competencia_convenio (cost=0.28..0.29 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=50)

  • Index Cond: (guia_convenio.guicompetencia = id)
54. 0.050 0.050 ↓ 0.0 0 50

Index Scan using fibobeneficiario_pkey on fibobeneficiario beneficiario_convenio (cost=0.42..0.46 rows=1 width=69) (actual time=0.001..0.001 rows=0 loops=50)

  • Index Cond: (guia_convenio.guibenefic = id)
55. 0.050 0.050 ↓ 0.0 0 50

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocolo_convenio (cost=0.42..0.46 rows=1 width=35) (actual time=0.001..0.001 rows=0 loops=50)

  • Index Cond: (guia_convenio.guiprotocolo = id)
56. 0.150 0.150 ↑ 1.0 1 50

Index Scan using fiboprotocolo_pkey on fiboprotocolo protocolo_prestador (cost=0.42..0.48 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=50)

  • Index Cond: (guia_prestador.guiprotocolo = id)
57. 0.150 0.150 ↑ 1.0 1 50

Index Scan using fiboarquivo_pkey on fiboarquivo arquivo_prestador (cost=0.42..0.79 rows=1 width=16) (actual time=0.003..0.003 rows=1 loops=50)

  • Index Cond: (protocolo_prestador.arquivo = id)
58. 0.050 0.050 ↓ 0.0 0 50

Index Scan using fiboarquivo_pkey on fiboarquivo arquivo_convenio (cost=0.42..0.79 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=50)

  • Index Cond: (protocolo_convenio.arquivo = id)
59. 0.000 0.000 ↑ 1.0 1 50

Materialize (cost=0.00..1.01 rows=1 width=78) (actual time=0.000..0.000 rows=1 loops=50)

60. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on fibohospital hospital (cost=0.00..1.01 rows=1 width=78) (actual time=0.006..0.007 rows=1 loops=1)

61. 0.050 0.050 ↓ 0.0 0 50

Index Scan using recebimento_pkey on recebimento (cost=0.28..0.30 rows=1 width=12) (actual time=0.001..0.001 rows=0 loops=50)

  • Index Cond: (guia_convenio.recebimento_id = id)
62. 0.100 18.000 ↑ 1.0 1 50

Aggregate (cost=14.41..14.42 rows=1 width=40) (actual time=0.360..0.360 rows=1 loops=50)

63. 17.900 17.900 ↓ 0.0 0 50

Function Scan on guia_totais_todos_recursos todos_recursos (cost=0.25..12.75 rows=333 width=28) (actual time=0.358..0.358 rows=0 loops=50)

  • Filter: (id > guia_recurso.id)
  • Rows Removed by Filter: 0
64. 0.050 13.600 ↑ 1.0 1 50

Aggregate (cost=15.26..15.27 rows=1 width=64) (actual time=0.272..0.272 rows=1 loops=50)

65. 13.550 13.550 ↓ 0.0 0 50

Function Scan on guia_totais_todos_recursos todos_recursos_1 (cost=0.25..15.25 rows=2 width=40) (actual time=0.271..0.271 rows=0 loops=50)

  • Filter: ((id > guia_recurso.id) AND (status_conciliacao = 'Fechada'::text))
  • Rows Removed by Filter: 0
66. 0.050 13.400 ↓ 0.0 0 50

Limit (cost=15.26..15.27 rows=1 width=28) (actual time=0.268..0.268 rows=0 loops=50)

67. 0.100 13.350 ↓ 0.0 0 50

Sort (cost=15.26..15.27 rows=1 width=28) (actual time=0.267..0.267 rows=0 loops=50)

  • Sort Key: todos_recursos_2.idx_recurso DESC
  • Sort Method: quicksort Memory: 25kB
68. 13.250 13.250 ↓ 0.0 0 50

Function Scan on guia_totais_todos_recursos todos_recursos_2 (cost=0.25..15.25 rows=1 width=28) (actual time=0.265..0.265 rows=0 loops=50)

  • Filter: (associado AND (id >= guia_recurso.id) AND (status_conciliacao = 'Fechada'::text))
  • Rows Removed by Filter: 0
69. 0.050 13.400 ↓ 0.0 0 50

Limit (cost=13.59..13.59 rows=1 width=189) (actual time=0.268..0.268 rows=0 loops=50)

70. 0.100 13.350 ↓ 0.0 0 50

Sort (cost=13.59..14.00 rows=167 width=189) (actual time=0.267..0.267 rows=0 loops=50)

  • Sort Key: todos_recursos_3.idx_recurso DESC
  • Sort Method: quicksort Memory: 25kB
71. 13.250 13.250 ↓ 0.0 0 50

Function Scan on guia_totais_todos_recursos todos_recursos_3 (cost=0.25..12.75 rows=167 width=189) (actual time=0.265..0.265 rows=0 loops=50)

  • Filter: (associado AND (id >= guia_recurso.id))
  • Rows Removed by Filter: 0
72.          

SubPlan (forNested Loop Left Join)

73. 0.050 0.250 ↑ 1.0 1 50

Result (cost=8.45..8.46 rows=1 width=1) (actual time=0.005..0.005 rows=1 loops=50)

74.          

Initplan (forResult)

75. 0.200 0.200 ↓ 0.0 0 50

Index Scan using idx_historico_alteracao_status_guia_guia_status_novo_idx on historico_alteracao_status_guia hist (cost=0.43..8.45 rows=1 width=0) (actual time=0.004..0.004 rows=0 loops=50)

  • Index Cond: ((guia = guia_prestador.id) AND (status_novo IS NULL))
  • Filter: ((status_anterior IS NOT NULL) AND (discriminador = 'ANALISE_DE_GLOSA'::text))
76. 0.050 0.350 ↓ 0.0 0 50

Limit (cost=8.46..8.47 rows=1 width=8) (actual time=0.007..0.007 rows=0 loops=50)

77. 0.150 0.300 ↓ 0.0 0 50

Sort (cost=8.46..8.47 rows=1 width=8) (actual time=0.006..0.006 rows=0 loops=50)

  • Sort Key: hist_1.data_alteracao DESC
  • Sort Method: quicksort Memory: 25kB
78. 0.150 0.150 ↓ 0.0 0 50

Index Scan using idx_historico_alteracao_status_guia_guia_status_novo_idx on historico_alteracao_status_guia hist_1 (cost=0.43..8.45 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=50)

  • Index Cond: ((guia = guia_prestador.id) AND (status_novo = 'Fechada'::text))
  • Filter: ((status_anterior IS NOT NULL) AND (discriminador = 'CONCILIACAO'::text))
79. 0.050 0.400 ↑ 1.0 1 50

Limit (cost=9.23..9.23 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=50)

80. 0.100 0.350 ↑ 4.0 1 50

Sort (cost=9.23..9.24 rows=4 width=8) (actual time=0.007..0.007 rows=1 loops=50)

  • Sort Key: hist_2.data_alteracao DESC
  • Sort Method: quicksort Memory: 25kB
81. 0.250 0.250 ↑ 4.0 1 50

Index Scan using idx_historico_alteracao_status_guia_guia_idx on historico_alteracao_status_guia hist_2 (cost=0.43..9.21 rows=4 width=8) (actual time=0.004..0.005 rows=1 loops=50)

  • Index Cond: (guia = guia_prestador.id)
  • Filter: (discriminador = 'CONCILIACAO'::text)
  • Rows Removed by Filter: 0
82. 0.000 0.200 ↑ 1.0 1 50

Limit (cost=9.23..9.23 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=50)

83. 0.100 0.200 ↑ 4.0 1 50

Sort (cost=9.23..9.24 rows=4 width=16) (actual time=0.004..0.004 rows=1 loops=50)

  • Sort Key: hist_3.data_alteracao DESC
  • Sort Method: quicksort Memory: 25kB
84. 0.100 0.100 ↑ 4.0 1 50

Index Scan using idx_historico_alteracao_status_guia_guia_idx on historico_alteracao_status_guia hist_3 (cost=0.43..9.21 rows=4 width=16) (actual time=0.002..0.002 rows=1 loops=50)

  • Index Cond: (guia = guia_prestador.id)
  • Filter: (discriminador = 'CONCILIACAO'::text)
  • Rows Removed by Filter: 0
85. 0.000 0.200 ↑ 1.0 1 50

Limit (cost=9.23..9.23 rows=1 width=9) (actual time=0.004..0.004 rows=1 loops=50)

86. 0.100 0.200 ↑ 4.0 1 50

Sort (cost=9.23..9.24 rows=4 width=9) (actual time=0.004..0.004 rows=1 loops=50)

  • Sort Key: hist_4.data_alteracao DESC
  • Sort Method: quicksort Memory: 25kB
87. 0.100 0.100 ↑ 4.0 1 50

Index Scan using idx_historico_alteracao_status_guia_guia_idx on historico_alteracao_status_guia hist_4 (cost=0.43..9.21 rows=4 width=9) (actual time=0.002..0.002 rows=1 loops=50)

  • Index Cond: (guia = guia_prestador.id)
  • Filter: (discriminador = 'CONCILIACAO'::text)
  • Rows Removed by Filter: 0
88. 0.050 0.100 ↓ 0.0 0 50

Limit (cost=9.22..9.23 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=50)

89. 0.000 0.050 ↓ 0.0 0 50

Sort (cost=9.22..9.23 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=50)

  • Sort Key: hist_5.data_alteracao DESC
  • Sort Method: quicksort Memory: 25kB
90. 0.040 0.050 ↓ 0.0 0 50

Result (cost=0.43..9.21 rows=1 width=8) (actual time=0.000..0.001 rows=0 loops=50)

  • One-Time Filter: (guia_prestador.guistatusanaliseglosa = 'Analisada'::text)
91. 0.010 0.010 ↓ 4.0 4 2

Index Scan using idx_historico_alteracao_status_guia_guia_idx on historico_alteracao_status_guia hist_5 (cost=0.43..9.21 rows=1 width=8) (actual time=0.004..0.005 rows=4 loops=2)

  • Index Cond: (guia = guia_prestador.id)
  • Filter: (discriminador = 'ANALISE_DE_GLOSA'::text)
  • Rows Removed by Filter: 4
92. 0.050 0.100 ↓ 0.0 0 50

Limit (cost=9.22..9.23 rows=1 width=16) (actual time=0.002..0.002 rows=0 loops=50)

93. 0.050 0.050 ↓ 0.0 0 50

Sort (cost=9.22..9.23 rows=1 width=16) (actual time=0.001..0.001 rows=0 loops=50)

  • Sort Key: hist_6.data_alteracao DESC
  • Sort Method: quicksort Memory: 25kB
94. 0.000 0.000 ↓ 0.0 0 50

Result (cost=0.43..9.21 rows=1 width=16) (actual time=0.000..0.000 rows=0 loops=50)

  • One-Time Filter: (guia_prestador.guistatusanaliseglosa = 'Analisada'::text)
95. 0.014 0.014 ↓ 4.0 4 2

Index Scan using idx_historico_alteracao_status_guia_guia_idx on historico_alteracao_status_guia hist_6 (cost=0.43..9.21 rows=1 width=16) (actual time=0.004..0.007 rows=4 loops=2)

  • Index Cond: (guia = guia_prestador.id)
  • Filter: (discriminador = 'ANALISE_DE_GLOSA'::text)
  • Rows Removed by Filter: 4
96. 0.050 0.200 ↑ 1.0 1 50

Aggregate (cost=10.49..10.50 rows=1 width=32) (actual time=0.004..0.004 rows=1 loops=50)

97. 0.150 0.150 ↓ 0.0 0 50

Index Scan using idx_fiboguia_guicobrancaoriginal_idx on fiboguia guia_pagamento_recurso_avulso (cost=0.43..10.49 rows=1 width=6) (actual time=0.003..0.003 rows=0 loops=50)

  • Index Cond: (guicobrancaoriginal = guia_prestador.id)
  • Filter: (guisituacaoguia = ANY ('{PagamentoDeRecurso,PagamentoDeRecursoAntigo}'::text[]))
98. 0.050 13.450 ↑ 1.0 1 50

Aggregate (cost=12.76..12.77 rows=1 width=8) (actual time=0.269..0.269 rows=1 loops=50)

99. 13.400 13.400 ↓ 0.0 0 50

Function Scan on guia_totais_todos_recursos (cost=0.25..12.75 rows=5 width=8) (actual time=0.268..0.268 rows=0 loops=50)

  • Filter: (id = guia_prestador.id)
  • Rows Removed by Filter: 0
100. 0.050 13.350 ↑ 1.0 1 50

Aggregate (cost=15.26..15.27 rows=1 width=32) (actual time=0.267..0.267 rows=1 loops=50)

101. 13.300 13.300 ↓ 0.0 0 50

Function Scan on guia_totais_todos_recursos guia_totais_todos_recursos_1 (cost=0.25..15.25 rows=2 width=20) (actual time=0.266..0.266 rows=0 loops=50)

  • Filter: ((id > guia_recurso.id) AND (status_analise = 'Analisada'::text))
  • Rows Removed by Filter: 0
102. 0.100 11.650 ↑ 1.0 1 50

Aggregate (cost=17.75..17.77 rows=1 width=32) (actual time=0.233..0.233 rows=1 loops=50)

103. 11.550 11.550 ↓ 0.0 0 50

Function Scan on guia_totais_todos_recursos guia_totais_todos_recursos_2 (cost=0.25..17.75 rows=2 width=20) (actual time=0.231..0.231 rows=0 loops=50)

  • Filter: ((id > guia_recurso.id) AND (status_analise <> 'Analisada'::text) AND (status_conciliacao = 'Fechada'::text))
  • Rows Removed by Filter: 0
Planning time : 56.445 ms
Execution time : 110.812 ms