explain.depesz.com

PostgreSQL's explain analyze made readable

Result: f023

Settings
# exclusive inclusive rows x rows loops node
1. 0.031 82.540 ↑ 1.0 50 1

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

2. 0.192 82.509 ↑ 114.8 50 1

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

3. 2.995 82.317 ↑ 114.8 50 1

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

4. 0.060 35.422 ↑ 114.8 50 1

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

5. 0.053 24.762 ↑ 114.8 50 1

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

6. 0.076 14.009 ↑ 114.8 50 1

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

7. 0.060 2.983 ↑ 114.8 50 1

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

8. 0.062 2.923 ↑ 114.8 50 1

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

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

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

10. 0.035 2.799 ↑ 114.8 50 1

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

11. 0.044 2.614 ↑ 114.8 50 1

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

12. 0.054 2.420 ↑ 114.8 50 1

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

13. 0.057 2.366 ↑ 114.8 50 1

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

14. 0.056 2.309 ↑ 114.8 50 1

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

15. 0.057 2.253 ↑ 114.8 50 1

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

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

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

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

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

  • Merge Cond: (remessa.id = guia_prestador.guiremessa)
18. 0.018 0.018 ↑ 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.018 rows=6 loops=1)

19. 0.105 1.724 ↑ 13,892.0 50 1

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

20. 0.055 1.619 ↑ 13,892.0 50 1

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

21. 0.026 1.414 ↑ 13,892.0 50 1

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

22. 0.023 1.338 ↑ 13,892.0 50 1

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

23. 0.039 1.165 ↑ 13,892.0 50 1

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

24. 0.038 1.126 ↑ 13,892.0 50 1

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

25. 0.051 1.088 ↑ 13,892.0 50 1

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

26. 0.045 1.037 ↑ 13,892.0 50 1

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

27. 0.020 0.992 ↑ 13,892.0 50 1

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

28. 0.051 0.872 ↑ 13,892.0 50 1

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

29. 0.035 0.821 ↑ 13,892.0 50 1

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

30. 0.067 0.586 ↑ 13,892.0 50 1

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

31. 0.082 0.519 ↑ 13,892.0 50 1

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

32. 0.064 0.287 ↑ 13,892.0 50 1

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

33. 0.073 0.073 ↑ 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.008..0.073 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.002..0.003 rows=1 loops=50)

  • Index Cond: (id = guia_prestador.guicompetencia)
35. 0.150 0.150 ↑ 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.003 rows=1 loops=50)

  • Index Cond: (convnome = competencia_prestador.comp_convenio)
36. 0.000 0.000 ↓ 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.000..0.000 rows=0 loops=50)

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

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

38. 0.030 0.150 ↓ 0.0 0 50

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

39. 0.100 0.100 ↓ 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.002..0.002 rows=0 loops=50)

  • Index Cond: (guia_prestador.id = guicobrancaoriginal)
40. 0.020 0.020 ↑ 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.004..0.004 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.000 0.000 ↓ 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.000 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. 0.150 0.150 ↑ 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.003..0.003 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.150 0.150 ↑ 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.003..0.003 rows=1 loops=50)

  • Index Cond: (guia_prestador.guibenefic = id)
50. 0.013 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.037 0.037 ↑ 1.0 1 1

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

  • Filter: (operadora_grupo_id = 40838)
  • Rows Removed by Filter: 103
52. 0.300 0.300 ↓ 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.006..0.006 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.000 0.000 ↓ 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.000..0.000 rows=0 loops=50)

  • Index Cond: (guia_convenio.guicompetencia = id)
54. 0.000 0.000 ↓ 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.000..0.000 rows=0 loops=50)

  • Index Cond: (guia_convenio.guibenefic = id)
55. 0.000 0.000 ↓ 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.000..0.000 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.002..0.003 rows=1 loops=50)

  • Index Cond: (protocolo_prestador.arquivo = id)
58. 0.000 0.000 ↓ 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.000..0.000 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.005 0.005 ↑ 1.0 1 1

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

61. 0.000 0.000 ↓ 0.0 0 50

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

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

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

63. 10.900 10.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.218..0.218 rows=0 loops=50)

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

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

65. 10.650 10.650 ↓ 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.213..0.213 rows=0 loops=50)

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

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

67. 0.150 10.600 ↓ 0.0 0 50

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

  • Sort Key: todos_recursos_2.idx_recurso DESC
  • Sort Method: quicksort Memory: 25kB
68. 10.450 10.450 ↓ 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.209..0.209 rows=0 loops=50)

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

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

70. 0.100 10.450 ↓ 0.0 0 50

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

  • Sort Key: todos_recursos_3.idx_recurso DESC
  • Sort Method: quicksort Memory: 25kB
71. 10.350 10.350 ↓ 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.207..0.207 rows=0 loops=50)

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

SubPlan (for Nested Loop Left Join)

73. 0.050 0.200 ↑ 1.0 1 50

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

74.          

Initplan (for Result)

75. 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 (cost=0.43..8.45 rows=1 width=0) (actual time=0.003..0.003 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.250 ↓ 0.0 0 50

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

77. 0.100 0.200 ↓ 0.0 0 50

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

  • Sort Key: hist_1.data_alteracao DESC
  • Sort Method: quicksort Memory: 25kB
78. 0.100 0.100 ↓ 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.002..0.002 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.300 ↑ 1.0 1 50

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

80. 0.050 0.250 ↑ 4.0 1 50

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

  • Sort Key: hist_2.data_alteracao DESC
  • Sort Method: quicksort Memory: 25kB
81. 0.200 0.200 ↑ 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.003..0.004 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.050 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.050 0.150 ↑ 4.0 1 50

Sort (cost=9.23..9.24 rows=4 width=9) (actual time=0.003..0.003 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.050 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.000 0.000 ↓ 0.0 0 50

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

  • One-Time Filter: (guia_prestador.guistatusanaliseglosa = 'Analisada'::text)
91. 0.012 0.012 ↓ 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.006 rows=4 loops=2)

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

Limit (cost=9.22..9.23 rows=1 width=16) (actual time=0.001..0.001 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.010 0.010 ↓ 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.003..0.005 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.150 ↑ 1.0 1 50

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

97. 0.100 0.100 ↓ 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.002..0.002 rows=0 loops=50)

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

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

99. 10.750 10.750 ↓ 0.0 0 50

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

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

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

101. 10.600 10.600 ↓ 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.212..0.212 rows=0 loops=50)

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

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

103. 10.450 10.450 ↓ 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.209..0.209 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 : 44.569 ms
Execution time : 83.453 ms