explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tGm6

Settings
# exclusive inclusive rows x rows loops node
1. 0.143 4,059.408 ↓ 36.0 36 1

Nested Loop (cost=64,382.36..64,382.45 rows=1 width=116) (actual time=816.931..4,059.408 rows=36 loops=1)

2. 0.079 228.290 ↓ 25.0 25 1

Unique (cost=48,469.68..48,469.70 rows=1 width=80) (actual time=228.193..228.290 rows=25 loops=1)

3. 0.062 228.211 ↓ 25.0 25 1

Sort (cost=48,469.68..48,469.69 rows=1 width=80) (actual time=228.192..228.211 rows=25 loops=1)

  • Sort Key: matriculaperiodoturmadisciplina.codigo, matriculaperiodoturmadisciplina.disciplina, matriculaperiodoturmadisciplina.ano, matriculaperiodoturmadisciplina.semestre, turma.identificadorturma, curso.nome
  • Sort Method: quicksort Memory: 28kB
4. 0.036 228.149 ↓ 25.0 25 1

Nested Loop (cost=1,002.11..48,469.67 rows=1 width=80) (actual time=4.896..228.149 rows=25 loops=1)

5. 0.047 228.013 ↓ 25.0 25 1

Nested Loop (cost=1,001.83..48,463.17 rows=1 width=80) (actual time=4.882..228.013 rows=25 loops=1)

6. 0.033 227.891 ↓ 25.0 25 1

Nested Loop (cost=1,001.54..48,456.87 rows=1 width=75) (actual time=4.869..227.891 rows=25 loops=1)

7. 0.000 227.783 ↓ 25.0 25 1

Nested Loop (cost=1,001.27..48,456.58 rows=1 width=31) (actual time=4.857..227.783 rows=25 loops=1)

  • Join Filter: (((matricula.gradecurricularatual = historico.matrizcurricular) AND ((historico.historicocursandoporcorrespondenciaapostransferencia IS NULL) OR (NOT historico.historicocursandoporcorrespondenciaapostransferencia)) AND ((historico.transferenciamatrizcurricularmatricula IS NULL) OR ((historico.transferenciamatrizcurricularmatricula IS NOT NULL) AND (NOT (SubPlan 1))))) OR ((matricula.gradecurricularatual <> historico.matrizcurricular) AND historico.historicocursandoporcorrespondenciaapostransferencia AND (historico.transferenciamatrizcurricularmatricula IS NOT NULL) AND (historico.disciplina = (SubPlan 2)) AND ((NOT historico.historicoporequivalencia) OR (historico.historicoporequivalencia IS NULL))) OR ((matricula.gradecurricularatual <> historico.matrizcurricular) AND historico.historicoequivalente AND (SubPlan 3)) OR ((historico.matrizcurricular = matriculaperiodo.gradecurricular) AND (matricula.gradecurricularatual <> historico.matrizcurricular) AND historico.historicodisciplinafazpartecomposicao AND (NOT (SubPlan 4))))
8. 11.010 227.606 ↓ 1.2 25 1

Gather (cost=1,000.85..44,967.93 rows=20 width=87) (actual time=4.824..227.606 rows=25 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
9. 0.155 216.596 ↑ 1.0 8 3

Nested Loop (cost=0.85..43,965.93 rows=8 width=87) (actual time=86.405..216.596 rows=8 loops=3)

10. 0.114 216.424 ↑ 1.0 8 3

Nested Loop (cost=0.42..43,898.27 rows=8 width=44) (actual time=86.350..216.424 rows=8 loops=3)

11. 216.298 216.298 ↑ 1.0 8 3

Parallel Seq Scan on matriculaperiodoturmadisciplina (cost=0.00..43,830.77 rows=8 width=31) (actual time=86.291..216.298 rows=8 loops=3)

  • Filter: ((matricula)::text = '053DT0000656'::text)
  • Rows Removed by Filter: 789591
12. 0.012 0.012 ↑ 1.0 1 25

Index Scan using matriculaperiodo_pkey on matriculaperiodo (cost=0.42..8.44 rows=1 width=21) (actual time=0.011..0.012 rows=1 loops=25)

  • Index Cond: (codigo = matriculaperiodoturmadisciplina.matriculaperiodo)
13. 0.017 0.017 ↑ 1.0 1 25

Index Scan using index_historico_matriculaperiodoturmadisciplina on historico (cost=0.43..8.45 rows=1 width=47) (actual time=0.016..0.017 rows=1 loops=25)

  • Index Cond: (matriculaperiodoturmadisciplina = matriculaperiodoturmadisciplina.codigo)
14. 0.275 0.275 ↑ 1.0 1 25

Index Scan using matricula_pkey on matricula (cost=0.42..0.54 rows=1 width=22) (actual time=0.011..0.011 rows=1 loops=25)

  • Index Cond: ((matricula)::text = (matriculaperiodo.matricula)::text)
15.          

SubPlan (forNested Loop)

16. 0.000 0.000 ↓ 0.0 0

Limit (cost=24.06..28.08 rows=1 width=4) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico his (cost=24.06..28.08 rows=1 width=4) (never executed)

  • Recheck Cond: (((matricula)::text = (historico.matricula)::text) AND (disciplina = historico.disciplina))
  • Filter: (historicocursandoporcorrespondenciaapostransferencia AND (matrizcurricular <> matricula.gradecurricularatual) AND ((anohistorico)::text = (historico.anohistorico)::text) AND ((semestrehistorico)::text = (historico.semestrehistorico)::text) AND (transferenciamatrizcurricularmatricula = historico.transferenciamatrizcurricularmatricula))
18. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=24.06..24.06 rows=1 width=0) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_historico_matricula_gradedisciplina (cost=0.00..4.59 rows=22 width=0) (never executed)

  • Index Cond: ((matricula)::text = (historico.matricula)::text)
20. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ch_historico_disciplina (cost=0.00..19.21 rows=904 width=0) (never executed)

  • Index Cond: (disciplina = historico.disciplina)
21. 0.000 0.000 ↓ 0.0 0

Limit (cost=24.06..28.08 rows=1 width=4) (never executed)

22. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico his_1 (cost=24.06..28.08 rows=1 width=4) (never executed)

  • Recheck Cond: (((matricula)::text = (historico.matricula)::text) AND (disciplina = historico.disciplina))
  • Filter: (((historicocursandoporcorrespondenciaapostransferencia IS NULL) OR (NOT historicocursandoporcorrespondenciaapostransferencia)) AND ((anohistorico)::text = (historico.anohistorico)::text) AND ((semestrehistorico)::text = (historico.semestrehistorico)::text) AND (transferenciamatrizcurricularmatricula = historico.transferenciamatrizcurricularmatricula) AND (matrizcurricular = matricula.gradecurricularatual))
23. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=24.06..24.06 rows=1 width=0) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_historico_matricula_gradedisciplina (cost=0.00..4.59 rows=22 width=0) (never executed)

  • Index Cond: ((matricula)::text = (historico.matricula)::text)
25. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ch_historico_disciplina (cost=0.00..19.21 rows=904 width=0) (never executed)

  • Index Cond: (disciplina = historico.disciplina)
26. 0.000 0.000 ↓ 0.0 0

Nested Loop Semi Join (cost=24.49..115.27 rows=1 width=0) (never executed)

27. 0.000 0.000 ↓ 0.0 0

Index Scan using ch_historico_matricula on historico hist (cost=0.43..87.18 rows=1 width=23) (never executed)

  • Index Cond: ((matricula)::text = (historico.matricula)::text)
  • Filter: (historicoporequivalencia AND (historico.mapaequivalenciadisciplina = mapaequivalenciadisciplina) AND (numeroagrupamentoequivalenciadisciplina = historico.numeroagrupamentoequivalenciadisciplina))
28. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico his_2 (cost=24.06..28.08 rows=1 width=23) (never executed)

  • Recheck Cond: (((matricula)::text = (historico.matricula)::text) AND (disciplina = hist.disciplina))
  • Filter: (((historicocursandoporcorrespondenciaapostransferencia IS NULL) OR (NOT historicocursandoporcorrespondenciaapostransferencia)) AND (matrizcurricular = matricula.gradecurricularatual) AND ((hist.anohistorico)::text = (anohistorico)::text) AND ((hist.semestrehistorico)::text = (semestrehistorico)::text) AND (hist.transferenciamatrizcurricularmatricula = transferenciamatrizcurricularmatricula))
29. 0.000 0.000 ↓ 0.0 0

BitmapAnd (cost=24.06..24.06 rows=1 width=0) (never executed)

30. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_historico_matricula_gradedisciplina (cost=0.00..4.59 rows=22 width=0) (never executed)

  • Index Cond: ((matricula)::text = (historico.matricula)::text)
31. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ch_historico_disciplina (cost=0.00..19.21 rows=904 width=0) (never executed)

  • Index Cond: (disciplina = hist.disciplina)
32. 0.000 0.000 ↓ 0.0 0

Index Only Scan using unq_historico_disciplina_matrper_matrperturm_grade_gd_gcgod on historico his_3 (cost=0.43..8.45 rows=1 width=4) (never executed)

  • Index Cond: ((disciplina = historico.disciplina) AND (matriculaperiodo = historico.matriculaperiodo) AND (matrizcurricular = matricula.gradecurricularatual))
  • Heap Fetches: 0
33. 0.075 0.075 ↑ 1.0 1 25

Index Scan using curso_pkey on curso (cost=0.27..0.29 rows=1 width=52) (actual time=0.003..0.003 rows=1 loops=25)

  • Index Cond: (codigo = matricula.curso)
34. 0.075 0.075 ↑ 1.0 1 25

Index Scan using turma_pkey on turma (cost=0.28..6.30 rows=1 width=13) (actual time=0.003..0.003 rows=1 loops=25)

  • Index Cond: (codigo = matriculaperiodoturmadisciplina.turma)
35. 0.100 0.100 ↑ 1.0 1 25

Index Only Scan using disciplina_pkey on disciplina (cost=0.28..6.50 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=25)

  • Index Cond: (codigo = matriculaperiodoturmadisciplina.disciplina)
  • Heap Fetches: 25
36. 0.050 3,830.975 ↑ 1.0 1 25

Subquery Scan on arquivosaluno (cost=15,912.68..15,912.73 rows=1 width=63) (actual time=153.238..153.239 rows=1 loops=25)

  • Filter: (matriculaperiodoturmadisciplina.disciplina = arquivosaluno.codigodisciplina)
37. 0.125 3,830.925 ↑ 1.0 1 25

Unique (cost=15,912.68..15,912.71 rows=1 width=169) (actual time=153.236..153.237 rows=1 loops=25)

38. 0.700 3,830.800 ↑ 1.0 1 25

Sort (cost=15,912.68..15,912.69 rows=1 width=169) (actual time=153.232..153.232 rows=1 loops=25)

  • Sort Key: turma_1.identificadorturma, curso_1.nome, disciplina_1.nome, arquivo.descricaoarquivo, arquivo.datadisponibilizacao, professor.nome, turma_1.codigo, curso_1.codigo, disciplina_1.codigo, professor.codigo, arquivo.codigo
  • Sort Method: quicksort Memory: 27kB
39. 0.100 3,830.100 ↑ 1.0 1 25

Nested Loop Left Join (cost=11,965.84..15,912.67 rows=1 width=169) (actual time=137.368..153.204 rows=1 loops=25)

40. 0.131 3,830.000 ↑ 1.0 1 25

Nested Loop Left Join (cost=11,965.57..15,912.34 rows=1 width=121) (actual time=137.365..153.200 rows=1 loops=25)

41. 0.220 3,829.725 ↑ 1.0 1 25

Nested Loop Left Join (cost=11,965.15..15,906.16 rows=1 width=96) (actual time=137.359..153.189 rows=1 loops=25)

42. 217.225 3,829.325 ↑ 1.0 1 25

Merge Left Join (cost=11,964.86..15,905.81 rows=1 width=87) (actual time=137.348..153.173 rows=1 loops=25)

  • Merge Cond: (arquivo.disciplina = "*SELECT* 1".disciplina)
  • Filter: ((((("*SELECT* 1".anovigente)::text = (matriculaperiodoturmadisciplina.ano)::text) AND (("*SELECT* 1".semestrevigente)::text = (matriculaperiodoturmadisciplina.semestre)::text) AND (NOT arquivo.manterdisponibilizacao)) OR arquivo.manterdisponibilizacao) AND ((arquivo.disciplina = matriculaperiodoturmadisciplina.disciplina) OR (arquivo.disciplina = "*SELECT* 1".disciplina)) AND (((arquivo.turma IS NULL) AND (arquivo.professor IS NULL)) OR ((arquivo.professor IS NULL) AND (arquivo.turma = "*SELECT* 1".turma)) OR ((arquivo.professor = "*SELECT* 1".professor) AND (arquivo.turma = "*SELECT* 1".turma)) OR ((arquivo.professor = "*SELECT* 1".professor) AND (arquivo.turma IS NULL))))
  • Rows Removed by Filter: 34829
43. 333.075 2,031.575 ↓ 40.9 34,769 25

Merge Join (cost=0.94..3,939.72 rows=850 width=92) (actual time=0.058..81.263 rows=34,769 loops=25)

  • Merge Cond: (arquivo.disciplina = disciplina_1.codigo)
44. 1,646.825 1,646.825 ↓ 4.1 34,770 25

Index Scan using idx_arquivo_teste_arquivo on arquivo (cost=0.42..36,591.06 rows=8,461 width=52) (actual time=0.045..65.873 rows=34,770 loops=25)

  • Index Cond: (datadisponibilizacao <= CURRENT_TIMESTAMP)
  • Filter: CASE WHEN ((NOT manterdisponibilizacao) AND (NOT apresentardeterminadoperiodo)) THEN false WHEN ((NOT manterdisponibilizacao) AND apresentardeterminadoperiodo) THEN ((dataindisponibilizacao >= CURRENT_TIMESTAMP) OR (dataindisponibilizacao IS NULL)) WHEN (manterdisponibilizacao AND (NOT apresentardeterminadoperiodo)) THEN true ELSE NULL::boolean END
  • Rows Removed by Filter: 62
45. 51.675 51.675 ↑ 1.0 5,266 25

Index Scan using disciplina_pkey on disciplina disciplina_1 (cost=0.28..239.47 rows=5,309 width=48) (actual time=0.010..2.067 rows=5,266 loops=25)

46. 0.550 1,580.525 ↓ 31.5 63 25

Sort (cost=11,963.93..11,963.93 rows=2 width=14) (actual time=63.204..63.221 rows=63 loops=25)

  • Sort Key: "*SELECT* 1".disciplina
  • Sort Method: quicksort Memory: 25kB
47. 0.075 1,579.975 ↑ 2.0 1 25

Append (cost=11,882.23..11,963.92 rows=2 width=14) (actual time=62.867..63.199 rows=1 loops=25)

48. 0.050 1,546.100 ↑ 1.0 1 25

Subquery Scan on *SELECT* 1 (cost=11,882.23..11,882.26 rows=1 width=14) (actual time=61.840..61.844 rows=1 loops=25)

49. 0.125 1,546.050 ↑ 1.0 1 25

Unique (cost=11,882.23..11,882.25 rows=1 width=15) (actual time=61.838..61.842 rows=1 loops=25)

50. 0.425 1,545.925 ↓ 4.0 4 25

Sort (cost=11,882.23..11,882.24 rows=1 width=15) (actual time=61.836..61.837 rows=4 loops=25)

  • Sort Key: horarioturma.turma, turma_2.turmaagrupada, horarioturmadiaitem.disciplina, horarioturmadiaitem.professor, horarioturma.anovigente, horarioturma.semestrevigente
  • Sort Method: quicksort Memory: 25kB
51. 0.530 1,545.500 ↓ 4.0 4 25

Nested Loop (cost=11,032.83..11,882.22 rows=1 width=15) (actual time=61.564..61.820 rows=4 loops=25)

  • Join Filter: (((NOT turma_2.turmaagrupada) AND (horarioturmadiaitem.disciplina = matriculaperiodoturmadisciplina.disciplina)) OR (turma_2.turmaagrupada AND (hashed SubPlan 5)))
52. 0.514 1,537.125 ↑ 3.0 63 25

Nested Loop (cost=11,025.30..11,089.42 rows=191 width=11) (actual time=61.437..61.485 rows=63 loops=25)

53. 0.114 1,535.625 ↑ 4.0 1 25

Nested Loop (cost=11,024.88..11,072.27 rows=4 width=11) (actual time=61.422..61.425 rows=1 loops=25)

54. 0.185 1,535.250 ↑ 6.0 1 25

Nested Loop (cost=11,024.60..11,070.24 rows=6 width=9) (actual time=61.409..61.410 rows=1 loops=25)

55. 0.325 1,534.775 ↑ 6.0 1 25

HashAggregate (cost=11,024.32..11,024.38 rows=6 width=4) (actual time=61.390..61.391 rows=1 loops=25)

  • Group Key: matriculaperiodoturmadisciplina_1.turmapratica
56. 0.300 1,534.450 ↑ 6.0 1 25

Append (cost=0.43..11,024.30 rows=6 width=4) (actual time=7.730..61.378 rows=1 loops=25)

57. 0.175 0.175 ↓ 0.0 0 25

Index Scan using idx_mptd_turmapratica on matriculaperiodoturmadisciplina matriculaperiodoturmadisciplina_1 (cost=0.43..8.45 rows=1 width=4) (actual time=0.007..0.007 rows=0 loops=25)

  • Index Cond: (turmapratica IS NOT NULL)
  • Filter: (((matricula)::text = (matriculaperiodoturmadisciplina.matricula)::text) AND (disciplina = matriculaperiodoturmadisciplina.disciplina))
58. 0.125 0.125 ↓ 0.0 0 25

Index Scan using idx_mptd_turmateorica on matriculaperiodoturmadisciplina matriculaperiodoturmadisciplina_2 (cost=0.43..8.45 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=25)

  • Index Cond: (turmateorica IS NOT NULL)
  • Filter: (((matricula)::text = (matriculaperiodoturmadisciplina.matricula)::text) AND (disciplina = matriculaperiodoturmadisciplina.disciplina))
59. 458.850 458.850 ↑ 1.0 1 25

Index Scan using unique_matriculaperiodoturmadisciplina_disc_matriculaperi_turma on matriculaperiodoturmadisciplina matriculaperiodoturmadisciplina_3 (cost=0.43..2,709.52 rows=1 width=4) (actual time=7.714..18.354 rows=1 loops=25)

  • Index Cond: (disciplina = matriculaperiodoturmadisciplina.disciplina)
  • Filter: ((turmateorica IS NULL) AND (turmapratica IS NULL) AND ((matricula)::text = (matriculaperiodoturmadisciplina.matricula)::text))
  • Rows Removed by Filter: 13118
60. 0.050 322.425 ↓ 0.0 0 25

Nested Loop (cost=0.71..2,765.93 rows=1 width=4) (actual time=12.897..12.897 rows=0 loops=25)

61. 0.221 322.375 ↓ 0.0 0 25

Nested Loop (cost=0.43..2,765.42 rows=1 width=4) (actual time=12.895..12.895 rows=0 loops=25)

  • Join Filter: (matriculaperiodoturmadisciplina_4.turmapratica = turmaagrupada.turma)
62. 322.125 322.125 ↑ 1.0 1 25

Index Scan using unique_matriculaperiodoturmadisciplina_disc_matriculaperi_turma on matriculaperiodoturmadisciplina matriculaperiodoturmadisciplina_4 (cost=0.43..2,709.52 rows=1 width=4) (actual time=4.802..12.885 rows=1 loops=25)

  • Index Cond: (disciplina = matriculaperiodoturmadisciplina.disciplina)
  • Filter: ((matricula)::text = (matriculaperiodoturmadisciplina.matricula)::text)
  • Rows Removed by Filter: 13118
63. 0.029 0.029 ↓ 0.0 0 29

Seq Scan on turmaagrupada (cost=0.00..30.40 rows=2,040 width=8) (actual time=0.001..0.001 rows=0 loops=29)

64. 0.000 0.000 ↓ 0.0 0

Index Scan using turma_pkey on turma turma_3 (cost=0.28..0.50 rows=1 width=4) (never executed)

  • Index Cond: (codigo = turmaagrupada.turmaorigem)
  • Filter: ((situacao)::text = 'AB'::text)
65. 0.025 321.550 ↓ 0.0 0 25

Nested Loop (cost=0.71..2,765.93 rows=1 width=4) (actual time=12.862..12.862 rows=0 loops=25)

66. 0.121 321.525 ↓ 0.0 0 25

Nested Loop (cost=0.43..2,765.42 rows=1 width=4) (actual time=12.861..12.861 rows=0 loops=25)

  • Join Filter: (matriculaperiodoturmadisciplina_5.turmateorica = turmaagrupada_1.turma)
67. 321.375 321.375 ↑ 1.0 1 25

Index Scan using unique_matriculaperiodoturmadisciplina_disc_matriculaperi_turma on matriculaperiodoturmadisciplina matriculaperiodoturmadisciplina_5 (cost=0.43..2,709.52 rows=1 width=4) (actual time=4.737..12.855 rows=1 loops=25)

  • Index Cond: (disciplina = matriculaperiodoturmadisciplina.disciplina)
  • Filter: ((matricula)::text = (matriculaperiodoturmadisciplina.matricula)::text)
  • Rows Removed by Filter: 13118
68. 0.029 0.029 ↓ 0.0 0 29

Seq Scan on turmaagrupada turmaagrupada_1 (cost=0.00..30.40 rows=2,040 width=8) (actual time=0.001..0.001 rows=0 loops=29)

69. 0.000 0.000 ↓ 0.0 0

Index Scan using turma_pkey on turma turma_4 (cost=0.28..0.50 rows=1 width=4) (never executed)

  • Index Cond: (codigo = turmaagrupada_1.turmaorigem)
  • Filter: ((situacao)::text = 'AB'::text)
70. 0.025 431.025 ↓ 0.0 0 25

Nested Loop (cost=0.71..2,765.93 rows=1 width=4) (actual time=17.241..17.241 rows=0 loops=25)

71. 0.121 431.000 ↓ 0.0 0 25

Nested Loop (cost=0.43..2,765.42 rows=1 width=4) (actual time=17.240..17.240 rows=0 loops=25)

  • Join Filter: (matriculaperiodoturmadisciplina_6.turma = turmaagrupada_2.turma)
72. 430.850 430.850 ↑ 1.0 1 25

Index Scan using unique_matriculaperiodoturmadisciplina_disc_matriculaperi_turma on matriculaperiodoturmadisciplina matriculaperiodoturmadisciplina_6 (cost=0.43..2,709.52 rows=1 width=4) (actual time=6.813..17.234 rows=1 loops=25)

  • Index Cond: (disciplina = matriculaperiodoturmadisciplina.disciplina)
  • Filter: ((turmateorica IS NULL) AND (turmapratica IS NULL) AND ((matricula)::text = (matriculaperiodoturmadisciplina.matricula)::text))
  • Rows Removed by Filter: 13118
73. 0.029 0.029 ↓ 0.0 0 29

Seq Scan on turmaagrupada turmaagrupada_2 (cost=0.00..30.40 rows=2,040 width=8) (actual time=0.001..0.001 rows=0 loops=29)

74. 0.000 0.000 ↓ 0.0 0

Index Scan using turma_pkey on turma turma_5 (cost=0.28..0.50 rows=1 width=4) (never executed)

  • Index Cond: (codigo = turmaagrupada_2.turmaorigem)
  • Filter: ((situacao)::text = 'AB'::text)
75. 0.290 0.290 ↑ 1.0 1 29

Index Scan using turma_pkey on turma turma_2 (cost=0.28..7.63 rows=1 width=5) (actual time=0.010..0.010 rows=1 loops=29)

  • Index Cond: (codigo = matriculaperiodoturmadisciplina_1.turmapratica)
76. 0.261 0.261 ↑ 1.0 1 29

Index Scan using ch_horarioturma_turma_ano_semestre on horarioturma (cost=0.28..0.33 rows=1 width=10) (actual time=0.008..0.009 rows=1 loops=29)

  • Index Cond: (turma = turma_2.codigo)
77. 0.986 0.986 ↑ 1.0 54 29

Index Scan using fk_horarioturmadia_horarioturma on horarioturmadia (cost=0.42..3.75 rows=54 width=8) (actual time=0.012..0.034 rows=54 loops=29)

  • Index Cond: (horarioturma = horarioturma.codigo)
78. 7.070 7.845 ↓ 0.0 0 1,569

Index Scan using idx_horturdiaitem_horturmdia on horarioturmadiaitem (cost=3.97..4.12 rows=1 width=12) (actual time=0.005..0.005 rows=0 loops=1,569)

  • Index Cond: (horarioturmadia = horarioturmadia.codigo)
  • Filter: ((disciplina = matriculaperiodoturmadisciplina.disciplina) OR (hashed SubPlan 5))
  • Rows Removed by Filter: 1
79.          

SubPlan (forIndex Scan)

80. 0.125 0.775 ↑ 4.0 1 25

HashAggregate (cost=3.50..3.54 rows=4 width=4) (actual time=0.031..0.031 rows=1 loops=25)

  • Group Key: ($27)
81. 0.125 0.650 ↑ 4.0 1 25

Append (cost=0.00..3.49 rows=4 width=4) (actual time=0.002..0.026 rows=1 loops=25)

82. 0.025 0.025 ↑ 1.0 1 25

Result (cost=0.00..0.01 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=25)

83. 0.300 0.300 ↓ 0.0 0 25

Seq Scan on disciplinaequivalente (cost=0.00..1.71 rows=1 width=4) (actual time=0.012..0.012 rows=0 loops=25)

  • Filter: (equivalente = $27)
  • Rows Removed by Filter: 57
84. 0.200 0.200 ↓ 0.0 0 25

Seq Scan on disciplinaequivalente disciplinaequivalente_1 (cost=0.00..1.71 rows=2 width=4) (actual time=0.008..0.008 rows=0 loops=25)

  • Filter: (disciplina = $27)
  • Rows Removed by Filter: 57
85. 0.050 33.800 ↓ 0.0 0 25

Subquery Scan on *SELECT* 2 (cost=1.00..81.64 rows=1 width=14) (actual time=1.352..1.352 rows=0 loops=25)

86. 0.291 33.750 ↓ 0.0 0 25

Nested Loop (cost=1.00..81.63 rows=1 width=15) (actual time=1.350..1.350 rows=0 loops=25)

87. 2.897 18.225 ↓ 102.0 102 25

Nested Loop (cost=0.57..74.06 rows=1 width=12) (actual time=0.326..0.729 rows=102 loops=25)

88. 10.250 10.250 ↓ 102.0 102 25

Index Scan using ch_turmadisciplina_disciplina on turmadisciplina (cost=0.29..65.75 rows=1 width=8) (actual time=0.324..0.410 rows=102 loops=25)

  • Index Cond: (disciplina = matriculaperiodoturmadisciplina.disciplina)
  • Filter: ((definicoestutoriaonline)::text = 'DINAMICA'::text)
  • Rows Removed by Filter: 263
89. 5.078 5.078 ↑ 1.0 1 2,539

Index Only Scan using turma_pkey on turma turma_6 (cost=0.28..8.30 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=2,539)

  • Index Cond: (codigo = turmadisciplina.turma)
  • Heap Fetches: 2539
90. 15.234 15.234 ↓ 0.0 0 2,539

Index Scan using matriculaperiodoturmadisciplina_turma_disciplina_matricula on matriculaperiodoturmadisciplina matriculaperiodoturmadisciplina_7 (cost=0.43..7.57 rows=1 width=14) (actual time=0.006..0.006 rows=0 loops=2,539)

  • Index Cond: ((turma = turma_6.codigo) AND (disciplina = matriculaperiodoturmadisciplina.disciplina) AND ((matricula)::text = (matriculaperiodoturmadisciplina.matricula)::text))
  • Filter: ((professor IS NOT NULL) AND ((modalidadedisciplina)::text = 'ON_LINE'::text))
  • Rows Removed by Filter: 0
91. 0.180 0.180 ↑ 1.0 1 36

Index Scan using turma_pkey on turma turma_1 (cost=0.28..0.35 rows=1 width=13) (actual time=0.005..0.005 rows=1 loops=36)

  • Index Cond: (arquivo.turma = codigo)
92. 0.144 0.144 ↑ 1.0 1 36

Index Scan using pessoa_pkey on pessoa professor (cost=0.42..6.19 rows=1 width=29) (actual time=0.004..0.004 rows=1 loops=36)

  • Index Cond: (arquivo.professor = codigo)
93. 0.000 0.000 ↓ 0.0 0 36

Index Scan using curso_pkey on curso curso_1 (cost=0.27..0.30 rows=1 width=52) (actual time=0.000..0.000 rows=0 loops=36)

  • Index Cond: (arquivo.curso = codigo)
Planning time : 19.867 ms
Execution time : 4,060.451 ms