explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pvox

Settings
# exclusive inclusive rows x rows loops node
1. 0.063 17,429.494 ↑ 1.1 232 1

Unique (cost=364,687.78..364,691.04 rows=261 width=61) (actual time=17,429.420..17,429.494 rows=232 loops=1)

2. 0.676 17,429.431 ↑ 1.1 232 1

Sort (cost=364,687.78..364,688.43 rows=261 width=61) (actual time=17,429.419..17,429.431 rows=232 loops=1)

  • Sort Key: unidadeensino.nome, turma.identificadorturma, turma.codigo, (array_to_string(array_agg(DISTINCT CASE WHEN (gradedisciplinacomposta.disciplina IS NOT NULL) THEN gradedisciplinacomposta.disciplina ELSE CASE WHEN (gdcgd.disciplina IS NOT NULL) THEN gdcgd.disciplina ELSE CASE WHEN (gdcgo.disciplina IS NOT NULL) THEN gdcgo.disciplina ELSE CASE WHEN (gradedisciplina.disciplina IS NOT NULL) THEN gradedisciplina.disciplina ELSE CASE WHEN (gradecurriculargrupooptativadisciplina.disciplina IS NOT NULL) THEN gradecurriculargrupooptativadisciplina.disciplina ELSE 5745 END END END END END), ','::text))
  • Sort Method: quicksort Memory: 43kB
3. 0.604 17,428.755 ↑ 1.1 232 1

GroupAggregate (cost=364,670.78..364,677.30 rows=261 width=61) (actual time=17,428.158..17,428.755 rows=232 loops=1)

  • Group Key: turma.codigo, unidadeensino.nome
4. 0.536 17,428.151 ↑ 1.1 232 1

Sort (cost=364,670.78..364,671.43 rows=261 width=49) (actual time=17,428.129..17,428.151 rows=232 loops=1)

  • Sort Key: turma.codigo, unidadeensino.nome
  • Sort Method: quicksort Memory: 43kB
5. 25.962 17,427.615 ↑ 1.1 232 1

Hash Left Join (cost=3,367.78..364,660.30 rows=261 width=49) (actual time=82.158..17,427.615 rows=232 loops=1)

  • Hash Cond: (unidadeensino.configuracoes = configuracoes.codigo)
  • Filter: ((SubPlan 11) OR (SubPlan 12) OR (SubPlan 13) OR (SubPlan 14) OR (SubPlan 15) OR (SubPlan 17) OR (SubPlan 18))
  • Rows Removed by Filter: 1,249
6. 2.372 318.423 ↓ 5.6 1,481 1

Hash Left Join (cost=3,365.74..207,781.29 rows=263 width=55) (actual time=51.179..318.423 rows=1,481 loops=1)

  • Hash Cond: (turma.unidadeensino = unidadeensino.codigo)
7. 11.010 315.985 ↓ 5.6 1,481 1

Hash Left Join (cost=3,358.01..207,772.83 rows=263 width=39) (actual time=51.105..315.985 rows=1,481 loops=1)

  • Hash Cond: (vagaturma.codigo = vagaturmadisciplina.vagaturma)
  • Filter: ((((vagaturmadisciplina.codigo IS NOT NULL) AND (vagaturmadisciplina.nrvagasmatriculareposicao IS NOT NULL) AND (vagaturmadisciplina.nrvagasmatriculareposicao > 0)) OR ((vagaturmadisciplina.codigo IS NULL) AND (turma.nrvagasinclusaoreposicao IS NOT NULL) AND (turma.nrvagasinclusaoreposicao > 0))) AND (((SubPlan 8) + (SubPlan 10)) < CASE WHEN (vagaturmadisciplina.nrvagasmatriculareposicao IS NOT NULL) THEN vagaturmadisciplina.nrvagasmatriculareposicao ELSE turma.nrvagasinclusaoreposicao END))
  • Rows Removed by Filter: 22
8. 3.026 129.846 ↓ 1.9 1,503 1

Nested Loop Left Join (cost=2,959.64..207,372.35 rows=804 width=47) (actual time=50.016..129.846 rows=1,503 loops=1)

9. 14.905 119.310 ↓ 1.9 1,502 1

Hash Left Join (cost=2,959.36..207,065.54 rows=804 width=43) (actual time=49.996..119.310 rows=1,502 loops=1)

  • Hash Cond: (gradedisciplina.codigo = gdcgd.gradedisciplina)
  • Join Filter: (NOT (alternatives: SubPlan 1 or hashed SubPlan 2))
  • Filter: (((turmadisciplina.disciplina = 5,745) AND (gradedisciplina.cargahoraria = 24)) OR ((turmadisciplina.disciplina = 5,745) AND (gradecurriculargrupooptativadisciplina.cargahoraria = 24)) OR ((gdcgd.disciplina = 5,745) AND (gdcgd.cargahoraria = 24)) OR ((gdcgo.disciplina = 5,745) AND (gdcgo.cargahoraria = 24)) OR ((gradedisciplinacomposta.disciplina = 5,745) AND (gradedisciplinacomposta.cargahoraria = 24)))
  • Rows Removed by Filter: 34,418
10. 7.872 104.400 ↓ 1.1 35,920 1

Hash Left Join (cost=2,942.16..201,809.25 rows=33,400 width=67) (actual time=49.905..104.400 rows=35,920 loops=1)

  • Hash Cond: (gradecurriculargrupooptativadisciplina.codigo = gdcgo.gradecurriculargrupooptativadisciplina)
  • Join Filter: (NOT (alternatives: SubPlan 3 or hashed SubPlan 4))
11. 7.928 96.521 ↓ 1.1 35,920 1

Hash Left Join (cost=2,924.96..3,149.26 rows=33,400 width=63) (actual time=49.892..96.521 rows=35,920 loops=1)

  • Hash Cond: (turmadisciplina.gradecurriculargrupooptativadisciplina = gradecurriculargrupooptativadisciplina.codigo)
12. 21.906 88.575 ↓ 1.1 35,920 1

Hash Left Join (cost=2,923.44..3,060.07 rows=33,400 width=55) (actual time=49.866..88.575 rows=35,920 loops=1)

  • Hash Cond: (turmadisciplina.gradedisciplina = gradedisciplina.codigo)
13. 17.158 63.072 ↓ 1.1 35,920 1

Hash Right Join (cost=2,511.62..2,560.54 rows=33,400 width=47) (actual time=46.151..63.072 rows=35,920 loops=1)

  • Hash Cond: (turmadisciplinacomposta.turmadisciplina = turmadisciplina.codigo)
14. 0.001 0.014 ↓ 0.0 0 1

Hash Left Join (cost=17.20..50.62 rows=1,850 width=12) (actual time=0.014..0.014 rows=0 loops=1)

  • Hash Cond: (turmadisciplinacomposta.gradedisciplinacomposta = gradedisciplinacomposta.codigo)
15. 0.013 0.013 ↓ 0.0 0 1

Seq Scan on turmadisciplinacomposta (cost=0.00..28.50 rows=1,850 width=8) (actual time=0.013..0.013 rows=0 loops=1)

16. 0.000 0.000 ↓ 0.0 0

Hash (cost=13.20..13.20 rows=320 width=12) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Seq Scan on gradedisciplinacomposta (cost=0.00..13.20 rows=320 width=12) (never executed)

18. 11.049 45.900 ↓ 1.1 35,920 1

Hash (cost=2,076.92..2,076.92 rows=33,400 width=39) (actual time=45.900..45.900 rows=35,920 loops=1)

  • Buckets: 65,536 Batches: 1 Memory Usage: 3,270kB
19. 14.552 34.851 ↓ 1.1 35,920 1

Hash Join (cost=194.41..2,076.92 rows=33,400 width=39) (actual time=3.064..34.851 rows=35,920 loops=1)

  • Hash Cond: (turmadisciplina.turma = turma.codigo)
20. 17.281 17.281 ↓ 1.0 71,795 1

Seq Scan on turmadisciplina (cost=0.00..1,693.89 rows=71,790 width=20) (actual time=0.015..17.281 rows=71,795 loops=1)

  • Filter: permitereposicao
  • Rows Removed by Filter: 394
21. 0.476 3.018 ↓ 1.0 2,226 1

Hash (cost=166.64..166.64 rows=2,222 width=23) (actual time=3.018..3.018 rows=2,226 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 159kB
22. 2.542 2.542 ↓ 1.0 2,226 1

Seq Scan on turma (cost=0.00..166.64 rows=2,222 width=23) (actual time=0.009..2.542 rows=2,226 loops=1)

  • Filter: ((((NOT subturma) AND (NOT turmaagrupada)) OR (subturma AND ((tiposubturma)::text = 'GERAL'::text))) AND ((situacao)::text = 'AB'::text))
  • Rows Removed by Filter: 2,550
23. 1.647 3.597 ↑ 1.0 10,392 1

Hash (cost=281.92..281.92 rows=10,392 width=12) (actual time=3.597..3.597 rows=10,392 loops=1)

  • Buckets: 16,384 Batches: 1 Memory Usage: 575kB
24. 1.950 1.950 ↑ 1.0 10,392 1

Seq Scan on gradedisciplina (cost=0.00..281.92 rows=10,392 width=12) (actual time=0.010..1.950 rows=10,392 loops=1)

25. 0.005 0.018 ↑ 1.0 23 1

Hash (cost=1.23..1.23 rows=23 width=12) (actual time=0.018..0.018 rows=23 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
26. 0.013 0.013 ↑ 1.0 23 1

Seq Scan on gradecurriculargrupooptativadisciplina (cost=0.00..1.23 rows=23 width=12) (actual time=0.010..0.013 rows=23 loops=1)

27. 0.001 0.007 ↓ 0.0 0 1

Hash (cost=13.20..13.20 rows=320 width=12) (actual time=0.006..0.007 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
28. 0.006 0.006 ↓ 0.0 0 1

Seq Scan on gradedisciplinacomposta gdcgo (cost=0.00..13.20 rows=320 width=12) (actual time=0.006..0.006 rows=0 loops=1)

29.          

SubPlan (for Hash Left Join)

30. 0.000 0.000 ↓ 0.0 0

Seq Scan on turmadisciplinacomposta turmadisciplinacomposta_3 (cost=0.00..33.13 rows=9 width=0) (never executed)

  • Filter: (turmadisciplina = turmadisciplina.codigo)
31. 0.000 0.000 ↓ 0.0 0

Seq Scan on turmadisciplinacomposta turmadisciplinacomposta_4 (cost=0.00..28.50 rows=1,850 width=4) (never executed)

32. 0.000 0.005 ↓ 0.0 0 1

Hash (cost=13.20..13.20 rows=320 width=12) (actual time=0.005..0.005 rows=0 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
33. 0.005 0.005 ↓ 0.0 0 1

Seq Scan on gradedisciplinacomposta gdcgd (cost=0.00..13.20 rows=320 width=12) (actual time=0.005..0.005 rows=0 loops=1)

34.          

SubPlan (for Hash Left Join)

35. 0.000 0.000 ↓ 0.0 0

Seq Scan on turmadisciplinacomposta turmadisciplinacomposta_1 (cost=0.00..33.13 rows=9 width=0) (never executed)

  • Filter: (turmadisciplina = turmadisciplina.codigo)
36. 0.000 0.000 ↓ 0.0 0

Seq Scan on turmadisciplinacomposta turmadisciplinacomposta_2 (cost=0.00..28.50 rows=1,850 width=4) (never executed)

37. 7.510 7.510 ↑ 1.0 1 1,502

Index Scan using ch_vagaturma_turma on vagaturma (cost=0.28..0.37 rows=1 width=10) (actual time=0.004..0.005 rows=1 loops=1,502)

  • Index Cond: (turma = turma.codigo)
  • Filter: ((turma.semestral AND ((ano)::text = ''::text) AND ((semestre)::text = ''::text)) OR (turma.anual AND ((ano)::text = ''::text)) OR ((NOT turma.semestral) AND (NOT turma.anual)))
38. 0.180 0.565 ↓ 1.0 1,093 1

Hash (cost=384.94..384.94 rows=1,074 width=12) (actual time=0.565..0.565 rows=1,093 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 63kB
39. 0.385 0.385 ↓ 1.0 1,093 1

Index Scan using ch_vagaturmadisciplina_disciplina on vagaturmadisciplina (cost=0.29..384.94 rows=1,074 width=12) (actual time=0.009..0.385 rows=1,093 loops=1)

  • Index Cond: (disciplina = 5,745)
40.          

SubPlan (for Hash Left Join)

41. 22.380 143.232 ↑ 1.0 1 1,492

Aggregate (cost=136.19..136.20 rows=1 width=8) (actual time=0.096..0.096 rows=1 loops=1,492)

42. 2.945 120.852 ↓ 0.0 0 1,492

Nested Loop (cost=2.52..136.19 rows=1 width=4) (actual time=0.063..0.081 rows=0 loops=1,492)

  • Join Filter: (((m.gradecurricularatual = h.matrizcurricular) AND ((h.historicocursandoporcorrespondenciaapostransferencia IS NULL) OR (NOT h.historicocursandoporcorrespondenciaapostransferencia)) AND ((h.transferenciamatrizcurricularmatricula IS NULL) OR ((h.transferenciamatrizcurricularmatricula IS NOT NULL) AND (NOT (SubPlan 5))))) OR ((m.gradecurricularatual <> h.matrizcurricular) AND h.historicocursandoporcorrespondenciaapostransferencia AND (h.transferenciamatrizcurricularmatricula IS NOT NULL) AND (h.disciplina = (SubPlan 6))) OR ((h.matrizcurricular = mp.gradecurricular) AND (m.gradecurricularatual <> h.matrizcurricular) AND h.historicodisciplinafazpartecomposicao AND (NOT (SubPlan 7))))
  • Rows Removed by Join Filter: 0
43. 9.154 113.392 ↓ 0.0 0 1,492

Nested Loop (cost=2.09..68.85 rows=1 width=16) (actual time=0.059..0.076 rows=0 loops=1,492)

  • Join Filter: (conf.codigo = confg.configuracoes)
44. 2.339 102.948 ↓ 0.0 0 1,492

Nested Loop (cost=2.09..67.83 rows=1 width=24) (actual time=0.054..0.069 rows=0 loops=1,492)

45. 1.694 99.964 ↓ 0.0 0 1,492

Nested Loop (cost=1.97..67.57 rows=1 width=20) (actual time=0.052..0.067 rows=0 loops=1,492)

46. 2.541 96.980 ↓ 0.0 0 1,492

Nested Loop (cost=1.82..67.41 rows=1 width=20) (actual time=0.050..0.065 rows=0 loops=1,492)

47. 1.896 92.504 ↓ 0.0 0 1,492

Nested Loop (cost=1.54..63.10 rows=1 width=24) (actual time=0.049..0.062 rows=0 loops=1,492)

  • Join Filter: CASE WHEN ((c.periodicidade)::text = ANY ('{SE,IN}'::text[])) THEN (((mp.ano)::text = ''::text) AND ((mp.semestre)::text = ''::text)) WHEN ((c.periodicidade)::text = 'AN'::text) THEN ((mp.ano)::text = ''::text) ELSE ((c.periodicidade)::text = 'IN'::text) END
48. 1.173 88.028 ↓ 0.0 0 1,492

Nested Loop (cost=1.27..62.79 rows=1 width=30) (actual time=0.046..0.059 rows=0 loops=1,492)

49. 2.378 74.600 ↓ 0.0 0 1,492

Nested Loop (cost=0.85..62.15 rows=1 width=32) (actual time=0.040..0.050 rows=0 loops=1,492)

50. 67.140 67.140 ↓ 0.0 0 1,492

Index Scan using matriculaperiodoturmadisciplina_turma_disciplina_matricula on matriculaperiodoturmadisciplina mptd (cost=0.43..53.71 rows=1 width=12) (actual time=0.035..0.045 rows=0 loops=1,492)

  • Index Cond: ((turma = turma.codigo) AND (disciplina = 5,745))
  • Filter: reposicao
  • Rows Removed by Filter: 35
51. 5.082 5.082 ↑ 1.0 1 726

Index Scan using matriculaperiodo_pkey on matriculaperiodo mp (cost=0.42..8.44 rows=1 width=24) (actual time=0.007..0.007 rows=1 loops=726)

  • Index Cond: (codigo = mptd.matriculaperiodo)
  • Filter: ((situacaomatriculaperiodo)::text = ANY ('{AT,PR,CO}'::text[]))
  • Rows Removed by Filter: 0
52. 12.255 12.255 ↑ 1.0 1 645

Index Scan using matricula_pkey on matricula m (cost=0.42..0.63 rows=1 width=26) (actual time=0.019..0.019 rows=1 loops=645)

  • Index Cond: ((matricula)::text = (mp.matricula)::text)
  • Filter: ((situacao)::text = 'AT'::text)
53. 2.580 2.580 ↑ 1.0 1 645

Index Scan using curso_pkey on curso c (cost=0.27..0.29 rows=1 width=7) (actual time=0.004..0.004 rows=1 loops=645)

  • Index Cond: (codigo = m.curso)
54. 1.935 1.935 ↑ 1.0 1 645

Index Only Scan using turma_pkey on turma t (cost=0.28..4.30 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=645)

  • Index Cond: (codigo = turma.codigo)
  • Heap Fetches: 0
55. 1.290 1.290 ↑ 1.0 1 645

Index Scan using unidadeensino_pkey on unidadeensino ue (cost=0.14..0.16 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=645)

  • Index Cond: (codigo = m.unidadeensino)
56. 0.645 0.645 ↑ 1.0 1 645

Index Only Scan using configuracoes_pkey on configuracoes conf (cost=0.13..0.25 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=645)

  • Index Cond: (codigo = ue.configuracoes)
  • Heap Fetches: 0
57. 1.290 1.290 ↑ 1.0 1 645

Seq Scan on configuracaogeralsistema confg (cost=0.00..1.01 rows=1 width=4) (actual time=0.001..0.002 rows=1 loops=645)

58. 4.515 4.515 ↑ 1.0 1 645

Index Scan using index_historico_matriculaperiodoturmadisciplina on historico h (cost=0.43..8.45 rows=1 width=38) (actual time=0.006..0.007 rows=1 loops=645)

  • Index Cond: (matriculaperiodoturmadisciplina = mptd.codigo)
59.          

SubPlan (for Nested Loop)

60. 0.000 0.000 ↓ 0.0 0

Limit (cost=24.19..28.22 rows=1 width=4) (never executed)

61. 0.000 0.000 ↓ 0.0 0

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

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

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

63. 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 = (h.matricula)::text)
64. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (disciplina = h.disciplina)
65. 0.000 0.000 ↓ 0.0 0

Limit (cost=24.19..28.22 rows=1 width=4) (never executed)

66. 0.000 0.000 ↓ 0.0 0

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

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

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

68. 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 = (h.matricula)::text)
69. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (disciplina = h.disciplina)
70. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((disciplina = h.disciplina) AND (matriculaperiodo = h.matriculaperiodo) AND (matrizcurricular = m.gradecurricularatual))
  • Heap Fetches: 0
71. 1.492 31.332 ↑ 1.0 1 1,492

Aggregate (cost=124.66..124.67 rows=1 width=8) (actual time=0.021..0.021 rows=1 loops=1,492)

72. 0.000 29.840 ↓ 0.0 0 1,492

Nested Loop Left Join (cost=2.39..124.65 rows=1 width=4) (actual time=0.020..0.020 rows=0 loops=1,492)

  • Join Filter: requerimento.disciplinaporequivalencia
  • Filter: ((requerimento.disciplina = 5,745) OR (mapaequivalenciadisciplinacursada.disciplina = 5,745))
73. 1.492 29.840 ↓ 0.0 0 1,492

Nested Loop Left Join (cost=2.11..116.34 rows=1 width=13) (actual time=0.020..0.020 rows=0 loops=1,492)

  • Filter: (((requerimento.situacaofinanceira)::text = 'IS'::text) OR (contareceber.codigo IS NULL) OR (contareceber.datavencimento <= CURRENT_DATE))
74. 1.492 28.348 ↓ 0.0 0 1,492

Nested Loop (cost=1.68..107.88 rows=1 width=20) (actual time=0.019..0.019 rows=0 loops=1,492)

  • Join Filter: (((turmareposicao.semestral AND ((matper.ano)::text = ''::text) AND ((matper.semestre)::text = ''::text)) OR (turmareposicao.anual AND ((matper.ano)::text = ''::text)) OR ((NOT turmareposicao.anual) AND (NOT turmareposicao.semestral))) AND CASE WHEN (requerimento.matriculaperiodo IS NOT NULL) THEN (requerimento.matriculaperiodo = matper.codigo) ELSE CASE WHEN (requerimento.codigo <> 0) THEN (matper.turma = requerimento.turma) ELSE (matper.codigo = (SubPlan 9)) END END)
75. 1.492 26.856 ↓ 0.0 0 1,492

Nested Loop (cost=1.26..98.77 rows=1 width=57) (actual time=0.018..0.018 rows=0 loops=1,492)

76. 0.000 25.364 ↓ 0.0 0 1,492

Nested Loop (cost=0.84..90.33 rows=1 width=43) (actual time=0.017..0.017 rows=0 loops=1,492)

77. 1.492 25.364 ↓ 0.0 0 1,492

Nested Loop (cost=0.56..82.02 rows=1 width=45) (actual time=0.017..0.017 rows=0 loops=1,492)

78. 23.872 23.872 ↓ 0.0 0 1,492

Index Scan using idx_requerimento_turmareposicao on requerimento (cost=0.42..68.51 rows=1 width=49) (actual time=0.016..0.016 rows=0 loops=1,492)

  • Index Cond: (turmareposicao = turma.codigo)
  • Filter: ((situacao)::text <> ALL ('{FD,FI}'::text[]))
  • Rows Removed by Filter: 9
79. 0.000 0.000 ↓ 0.0 0

Index Scan using tiporequerimento_pkey on tiporequerimento (cost=0.14..8.16 rows=1 width=4) (never executed)

  • Index Cond: (codigo = requerimento.tiporequerimento)
  • Filter: ((tipo)::text = 'RE'::text)
80. 0.000 0.000 ↓ 0.0 0

Index Scan using turma_pkey on turma turmareposicao (cost=0.28..8.30 rows=1 width=6) (never executed)

  • Index Cond: (codigo = turma.codigo)
81. 0.000 0.000 ↓ 0.0 0

Index Scan using matricula_pkey on matricula mat (cost=0.42..8.44 rows=1 width=14) (never executed)

  • Index Cond: ((matricula)::text = (requerimento.matricula)::text)
  • Filter: ((situacao)::text = 'AT'::text)
82. 0.000 0.000 ↓ 0.0 0

Index Scan using ch_matriculaperiodo_matricula on matriculaperiodo matper (cost=0.42..0.62 rows=1 width=24) (never executed)

  • Index Cond: ((matricula)::text = (mat.matricula)::text)
  • Filter: ((situacaomatriculaperiodo)::text = ANY ('{AT,PR}'::text[]))
83.          

SubPlan (for Nested Loop)

84. 0.000 0.000 ↓ 0.0 0

Limit (cost=8.45..8.46 rows=1 width=40) (never executed)

85. 0.000 0.000 ↓ 0.0 0

Sort (cost=8.45..8.46 rows=1 width=40) (never executed)

  • Sort Key: ((((mp_1.ano)::text || '/'::text) || (mp_1.semestre)::text)) DESC, mp_1.periodoletivomatricula DESC
86. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_matriculaperiodo_matricula_ano_semestre on matriculaperiodo mp_1 (cost=0.42..8.44 rows=1 width=40) (never executed)

  • Index Cond: ((matricula)::text = (requerimento.matricula)::text)
87. 0.000 0.000 ↓ 0.0 0

Index Scan using contareceber_pkey on contareceber (cost=0.43..8.45 rows=1 width=12) (never executed)

  • Index Cond: (codigo = requerimento.contareceber)
88. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_mapaequivalenciadisciplinacursada_codigo on mapaequivalenciadisciplinacursada (cost=0.28..8.30 rows=1 width=8) (never executed)

  • Index Cond: (codigo = requerimento.mapaequivalenciadisciplinacursada)
89. 0.023 0.066 ↑ 1.0 77 1

Hash (cost=6.77..6.77 rows=77 width=24) (actual time=0.066..0.066 rows=77 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
90. 0.043 0.043 ↑ 1.0 77 1

Seq Scan on unidadeensino (cost=0.00..6.77 rows=77 width=24) (actual time=0.010..0.043 rows=77 loops=1)

91. 0.008 0.028 ↑ 1.0 1 1

Hash (cost=2.03..2.03 rows=1 width=8) (actual time=0.028..0.028 rows=1 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
92. 0.005 0.020 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.00..2.03 rows=1 width=8) (actual time=0.019..0.020 rows=1 loops=1)

  • Join Filter: (configuracaogeralsistema.configuracoes = configuracoes.codigo)
93. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on configuracoes (cost=0.00..1.01 rows=1 width=4) (actual time=0.008..0.008 rows=1 loops=1)

94. 0.007 0.007 ↑ 1.0 1 1

Seq Scan on configuracaogeralsistema (cost=0.00..1.01 rows=1 width=8) (actual time=0.006..0.007 rows=1 loops=1)

95.          

SubPlan (for Hash Left Join)

96. 8.100 155.505 ↓ 0.0 0 1,481

Nested Loop (cost=1.12..62.73 rows=1 width=0) (actual time=0.105..0.105 rows=0 loops=1,481)

97. 2.741 111.075 ↑ 2.0 8 1,481

Nested Loop (cost=0.70..50.23 rows=16 width=4) (actual time=0.046..0.075 rows=8 loops=1,481)

98. 5.924 5.924 ↑ 1.0 1 1,481

Index Scan using ch_horarioturma_turma_ano_semestre on horarioturma ht (cost=0.28..8.30 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=1,481)

  • Index Cond: (turma = turma.codigo)
  • Filter: ((turma.semestral AND ((anovigente)::text = ''::text) AND ((semestrevigente)::text = ''::text)) OR (turma.anual AND ((anovigente)::text = ''::text)) OR ((NOT turma.semestral) AND (NOT turma.anual)))
99. 102.410 102.410 ↑ 1.4 13 931

Index Scan using fk_horarioturmadia_horarioturma on horarioturmadia htd (cost=0.42..41.75 rows=18 width=8) (actual time=0.066..0.110 rows=13 loops=931)

  • Index Cond: (horarioturma = ht.codigo)
  • Filter: (data >= (CURRENT_DATE + (((CASE WHEN (configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao > 0) THEN configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao ELSE 0 END)::text || ' days'::text))::interval))
  • Rows Removed by Filter: 36
100. 36.330 36.330 ↓ 0.0 0 12,110

Index Scan using idx_horturdiaitem_horturmdia on horarioturmadiaitem htdi (cost=0.42..0.77 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=12,110)

  • Index Cond: (horarioturmadia = htd.codigo)
  • Filter: ((disciplina = 5,745) OR (gradedisciplinacomposta.disciplina = disciplina) OR (gdcgd.disciplina = disciplina) OR (gdcgo.disciplina = disciplina))
  • Rows Removed by Filter: 1
101. 1.249 29.976 ↓ 0.0 0 1,249

Nested Loop (cost=5.45..39.72 rows=1 width=0) (actual time=0.024..0.024 rows=0 loops=1,249)

102. 1.249 28.727 ↓ 0.0 0 1,249

Nested Loop (cost=5.03..27.22 rows=16 width=4) (actual time=0.023..0.023 rows=0 loops=1,249)

103. 19.984 27.478 ↓ 0.0 0 1,249

Nested Loop (cost=4.59..23.07 rows=1 width=4) (actual time=0.022..0.022 rows=0 loops=1,249)

104. 2.498 7.494 ↓ 0.0 0 1,249

Bitmap Heap Scan on turma t_1 (cost=4.31..14.75 rows=1 width=4) (actual time=0.006..0.006 rows=0 loops=1,249)

  • Recheck Cond: (turmaprincipal = turma.codigo)
  • Filter: (subturma AND (NOT turmaagrupada) AND ((situacao)::text = 'AB'::text))
105. 4.996 4.996 ↓ 0.0 0 1,249

Bitmap Index Scan on idx_turma_turmaprincipal (cost=0.00..4.30 rows=3 width=0) (actual time=0.004..0.004 rows=0 loops=1,249)

  • Index Cond: (turmaprincipal = turma.codigo)
106. 0.000 0.000 ↓ 0.0 0

Index Scan using ch_horarioturma_turma_ano_semestre on horarioturma ht_1 (cost=0.28..8.30 rows=1 width=8) (never executed)

  • Index Cond: (turma = t_1.codigo)
  • Filter: ((turma.semestral AND ((anovigente)::text = ''::text) AND ((semestrevigente)::text = ''::text)) OR (turma.anual AND ((anovigente)::text = ''::text)) OR ((NOT turma.semestral) AND (NOT turma.anual)))
107. 0.000 0.000 ↓ 0.0 0

Index Scan using unq_horarioturmadia_horarioturma_data on horarioturmadia htd_1 (cost=0.44..3.97 rows=18 width=8) (never executed)

  • Index Cond: ((horarioturma = ht_1.codigo) AND (data >= (CURRENT_DATE + (((CASE WHEN (configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao > 0) THEN configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao ELSE 0 END)::text || ' days'::text))::interval)))
108. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_horturdiaitem_horturmdia on horarioturmadiaitem htdi_1 (cost=0.42..0.77 rows=1 width=4) (never executed)

  • Index Cond: (horarioturmadia = htd_1.codigo)
  • Filter: ((disciplina = 5,745) OR (gradedisciplinacomposta.disciplina = disciplina) OR (gdcgd.disciplina = disciplina) OR (gdcgo.disciplina = disciplina))
109. 0.000 13.739 ↓ 0.0 0 1,249

Nested Loop (cost=5.65..119.91 rows=1 width=0) (actual time=0.011..0.011 rows=0 loops=1,249)

110. 1.249 13.739 ↓ 0.0 0 1,249

Nested Loop (cost=5.23..94.13 rows=33 width=4) (actual time=0.011..0.011 rows=0 loops=1,249)

111. 0.000 12.490 ↓ 0.0 0 1,249

Nested Loop (cost=4.79..85.82 rows=2 width=4) (actual time=0.010..0.010 rows=0 loops=1,249)

112. 8.743 12.490 ↓ 0.0 0 1,249

Nested Loop (cost=4.51..81.94 rows=8 width=12) (actual time=0.010..0.010 rows=0 loops=1,249)

113. 1.249 3.747 ↓ 0.0 0 1,249

Bitmap Heap Scan on turmaagrupada (cost=4.23..14.79 rows=10 width=4) (actual time=0.003..0.003 rows=0 loops=1,249)

  • Recheck Cond: (turma = turma.codigo)
114. 2.498 2.498 ↓ 0.0 0 1,249

Bitmap Index Scan on idx_turmaagrupada_turma (cost=0.00..4.23 rows=10 width=0) (actual time=0.002..0.002 rows=0 loops=1,249)

  • Index Cond: (turma = turma.codigo)
115. 0.000 0.000 ↓ 0.0 0

Index Scan using ch_horarioturma_turma_ano_semestre on horarioturma ht_2 (cost=0.28..6.70 rows=1 width=8) (never executed)

  • Index Cond: (turma = turmaagrupada.turmaorigem)
  • Filter: ((turma.semestral AND ((anovigente)::text = ''::text) AND ((semestrevigente)::text = ''::text)) OR (turma.anual AND ((anovigente)::text = ''::text)) OR ((NOT turma.semestral) AND (NOT turma.anual)))
116. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (codigo = ht_2.turma)
  • Filter: ((situacao)::text = 'AB'::text)
117. 0.000 0.000 ↓ 0.0 0

Index Scan using unq_horarioturmadia_horarioturma_data on horarioturmadia htd_2 (cost=0.44..3.97 rows=18 width=8) (never executed)

  • Index Cond: ((horarioturma = ht_2.codigo) AND (data >= (CURRENT_DATE + (((CASE WHEN (configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao > 0) THEN configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao ELSE 0 END)::text || ' days'::text))::interval)))
118. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_horturdiaitem_horturmdia on horarioturmadiaitem htdi_2 (cost=0.42..0.77 rows=1 width=4) (never executed)

  • Index Cond: (horarioturmadia = htd_2.codigo)
  • Filter: ((disciplina = 5,745) OR (gradedisciplinacomposta.disciplina = disciplina) OR (gdcgd.disciplina = disciplina) OR (gdcgo.disciplina = disciplina))
119. 6.245 31.225 ↓ 0.0 0 1,249

Hash Join (cost=8.03..122.28 rows=1 width=0) (actual time=0.025..0.025 rows=0 loops=1,249)

  • Hash Cond: (htdi_3.disciplina = de.equivalente)
120. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.65..119.58 rows=50 width=4) (never executed)

121. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=5.23..94.13 rows=33 width=4) (never executed)

122. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=4.79..85.82 rows=2 width=4) (never executed)

123. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=4.51..81.94 rows=8 width=12) (never executed)

124. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on turmaagrupada turmaagrupada_1 (cost=4.23..14.79 rows=10 width=4) (never executed)

  • Recheck Cond: (turma = turma.codigo)
125. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_turmaagrupada_turma (cost=0.00..4.23 rows=10 width=0) (never executed)

  • Index Cond: (turma = turma.codigo)
126. 0.000 0.000 ↓ 0.0 0

Index Scan using ch_horarioturma_turma_ano_semestre on horarioturma ht_3 (cost=0.28..6.70 rows=1 width=8) (never executed)

  • Index Cond: (turma = turmaagrupada_1.turmaorigem)
  • Filter: ((turma.semestral AND ((anovigente)::text = ''::text) AND ((semestrevigente)::text = ''::text)) OR (turma.anual AND ((anovigente)::text = ''::text)) OR ((NOT turma.semestral) AND (NOT turma.anual)))
127. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (codigo = ht_3.turma)
  • Filter: ((situacao)::text = 'AB'::text)
128. 0.000 0.000 ↓ 0.0 0

Index Scan using unq_horarioturmadia_horarioturma_data on horarioturmadia htd_3 (cost=0.44..3.97 rows=18 width=8) (never executed)

  • Index Cond: ((horarioturma = ht_3.codigo) AND (data >= (CURRENT_DATE + (((CASE WHEN (configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao > 0) THEN configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao ELSE 0 END)::text || ' days'::text))::interval)))
129. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_horturdiaitem_horturmdia on horarioturmadiaitem htdi_3 (cost=0.42..0.75 rows=2 width=8) (never executed)

  • Index Cond: (horarioturmadia = htd_3.codigo)
130. 8.743 24.980 ↓ 0.0 0 1,249

Hash (cost=2.30..2.30 rows=6 width=4) (actual time=0.020..0.020 rows=0 loops=1,249)

  • Buckets: 1,024 Batches: 1 Memory Usage: 8kB
131. 16.237 16.237 ↓ 0.0 0 1,249

Seq Scan on disciplinaequivalente de (cost=0.00..2.30 rows=6 width=4) (actual time=0.013..0.013 rows=0 loops=1,249)

  • Filter: ((disciplina = 5,745) OR (gradedisciplinacomposta.disciplina = disciplina) OR (gdcgd.disciplina = disciplina) OR (gdcgo.disciplina = disciplina))
  • Rows Removed by Filter: 65
132. 0.000 13.739 ↓ 0.0 0 1,249

Nested Loop (cost=10.10..36.72 rows=1 width=0) (actual time=0.011..0.011 rows=0 loops=1,249)

133. 1.249 13.739 ↓ 0.0 0 1,249

Nested Loop (cost=9.96..36.21 rows=3 width=4) (actual time=0.011..0.011 rows=0 loops=1,249)

134. 1.249 12.490 ↓ 0.0 0 1,249

Nested Loop (cost=9.54..34.67 rows=2 width=4) (actual time=0.010..0.010 rows=0 loops=1,249)

135. 0.000 11.241 ↓ 0.0 0 1,249

Nested Loop (cost=9.10..30.52 rows=1 width=4) (actual time=0.009..0.009 rows=0 loops=1,249)

136. 1.249 11.241 ↓ 0.0 0 1,249

Nested Loop (cost=8.82..30.03 rows=1 width=12) (actual time=0.009..0.009 rows=0 loops=1,249)

137. 6.245 9.992 ↓ 0.0 0 1,249

Nested Loop (cost=8.54..29.64 rows=1 width=4) (actual time=0.008..0.008 rows=0 loops=1,249)

138. 1.249 3.747 ↓ 0.0 0 1,249

Bitmap Heap Scan on turma tsub (cost=4.31..14.76 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=1,249)

  • Recheck Cond: (turmaprincipal = turma.codigo)
  • Filter: (subturma AND ((tiposubturma)::text = ANY ('{PRATICA,TEORICA}'::text[])) AND ((situacao)::text = 'AB'::text))
139. 2.498 2.498 ↓ 0.0 0 1,249

Bitmap Index Scan on idx_turma_turmaprincipal (cost=0.00..4.30 rows=3 width=0) (actual time=0.002..0.002 rows=0 loops=1,249)

  • Index Cond: (turmaprincipal = turma.codigo)
140. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on turmaagrupada turmaagrupada_2 (cost=4.23..14.79 rows=10 width=8) (never executed)

  • Recheck Cond: (turma = tsub.codigo)
141. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_turmaagrupada_turma (cost=0.00..4.23 rows=10 width=0) (never executed)

  • Index Cond: (turma = tsub.codigo)
142. 0.000 0.000 ↓ 0.0 0

Index Scan using ch_horarioturma_turma_ano_semestre on horarioturma ht_4 (cost=0.28..0.38 rows=1 width=8) (never executed)

  • Index Cond: (turma = turmaagrupada_2.turmaorigem)
  • Filter: ((turma.semestral AND ((anovigente)::text = ''::text) AND ((semestrevigente)::text = ''::text)) OR (turma.anual AND ((anovigente)::text = ''::text)) OR ((NOT turma.semestral) AND (NOT turma.anual)))
143. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (codigo = ht_4.turma)
  • Filter: ((situacao)::text = 'AB'::text)
144. 0.000 0.000 ↓ 0.0 0

Index Scan using unq_horarioturmadia_horarioturma_data on horarioturmadia htd_4 (cost=0.44..3.97 rows=18 width=8) (never executed)

  • Index Cond: ((horarioturma = ht_4.codigo) AND (data >= (CURRENT_DATE + (((CASE WHEN (configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao > 0) THEN configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao ELSE 0 END)::text || ' days'::text))::interval)))
145. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_horturdiaitem_horturmdia on horarioturmadiaitem htdi_4 (cost=0.42..0.75 rows=2 width=8) (never executed)

  • Index Cond: (horarioturmadia = htd_4.codigo)
146. 0.000 0.000 ↓ 0.0 0

Index Only Scan using disciplinaequivalente_pkey on disciplinaequivalente de_1 (cost=0.14..0.16 rows=1 width=4) (never executed)

  • Index Cond: ((disciplina = 5,745) AND (equivalente = htdi_4.disciplina))
  • Heap Fetches: 0
147. 1.249 16,786.560 ↓ 0.0 0 1,249

Merge Join (cost=1.55..42,026.75 rows=272 width=0) (actual time=13.440..13.440 rows=0 loops=1,249)

  • Merge Cond: (t_5.codigo = turmaagrupada_3.turmaorigem)
  • Join Filter: (SubPlan 16)
148. 785.621 16,782.813 ↑ 1,273.0 1 1,249

Nested Loop (cost=1.40..37,499.23 rows=1,273 width=16) (actual time=13.437..13.437 rows=1 loops=1,249)

149. 971.722 4,011.788 ↑ 11.6 4,798 1,249

Nested Loop (cost=0.98..5,967.41 rows=55,442 width=20) (actual time=0.062..3.212 rows=4,798 loops=1,249)

150. 161.121 1,521.282 ↑ 14.8 76 1,249

Merge Join (cost=0.56..610.32 rows=1,128 width=12) (actual time=0.055..1.218 rows=76 loops=1,249)

  • Merge Cond: (ht_5.turma = t_5.codigo)
151. 644.484 644.484 ↑ 1.6 1,537 1,249

Index Scan using ch_horarioturma_turma_ano_semestre on horarioturma ht_5 (cost=0.28..183.05 rows=2,420 width=8) (actual time=0.006..0.516 rows=1,537 loops=1,249)

  • Filter: ((turma.semestral AND ((anovigente)::text = ''::text) AND ((semestrevigente)::text = ''::text)) OR (turma.anual AND ((anovigente)::text = ''::text)) OR ((NOT turma.semestral) AND (NOT turma.anual)))
152. 715.677 715.677 ↑ 28.2 79 1,249

Index Scan using turma_pkey on turma t_5 (cost=0.28..404.37 rows=2,226 width=4) (actual time=0.036..0.573 rows=79 loops=1,249)

  • Filter: ((situacao)::text = 'AB'::text)
  • Rows Removed by Filter: 1,819
153. 1,518.784 1,518.784 ↓ 1.2 63 94,924

Index Scan using fk_horarioturmadia_horarioturma on horarioturmadia htd_5 (cost=0.42..4.21 rows=54 width=16) (actual time=0.004..0.016 rows=63 loops=94,924)

  • Index Cond: (horarioturma = ht_5.codigo)
154. 11,985.404 11,985.404 ↓ 0.0 0 5,992,702

Index Scan using idx_horturdiaitem_horturmdia on horarioturmadiaitem htdi_5 (cost=0.42..0.56 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=5,992,702)

  • Index Cond: (horarioturmadia = htd_5.codigo)
  • Filter: (disciplina = 5,745)
  • Rows Removed by Filter: 1
155. 2.498 2.498 ↓ 0.0 0 1,249

Index Scan using idx_turmaagrupada_turmaorigem on turmaagrupada turmaagrupada_3 (cost=0.15..74.75 rows=2,040 width=8) (actual time=0.002..0.002 rows=0 loops=1,249)

156.          

SubPlan (for Merge Join)

157. 0.000 0.000 ↓ 0.0 0

Result (cost=0.28..16.03 rows=1 width=4) (never executed)

  • One-Time Filter: (htd_5.data >= (CURRENT_DATE + (((CASE WHEN (configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao > 0) THEN configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao ELSE 0 END)::text || ' days'::text))::interval))
158. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_turma_turmaprincipal on turma tsub_1 (cost=0.28..16.03 rows=1 width=4) (never executed)

  • Index Cond: (turmaprincipal = turma.codigo)
  • Filter: (subturma AND ((tiposubturma)::text = ANY ('{PRATICA,TEORICA}'::text[])) AND ((situacao)::text = 'AB'::text))
159. 1.249 52.458 ↓ 0.0 0 1,249

Nested Loop (cost=0.57..59.06 rows=1 width=0) (actual time=0.042..0.042 rows=0 loops=1,249)

160. 51.209 51.209 ↓ 0.0 0 1,249

Index Scan using unique_programacaotutoriaonline on programacaotutoriaonline (cost=0.28..50.74 rows=1 width=8) (actual time=0.041..0.041 rows=0 loops=1,249)

  • Index Cond: ((turma = turma.codigo) AND (disciplina = 5,745))
  • Filter: ((definirperiodoaulaonline IS TRUE) AND ((turma.semestral AND ((ano)::text = ''::text) AND ((semestre)::text = ''::text)) OR (turma.anual AND ((ano)::text = ''::text)) OR ((NOT turma.semestral) AND (NOT turma.anual))) AND (datainicioaula >= (CURRENT_DATE + (((CASE WHEN (configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao > 0) THEN configuracaogeralsistema.qtddiasmaximoantecedenciaremarcaraulareposicao ELSE 0 END)::text || ' days'::text))::interval)))
161. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_turmadisciplina_turma_disciplina on turmadisciplina turmadisciplina_1 (cost=0.29..8.32 rows=1 width=8) (never executed)

  • Index Cond: ((turma = turma.codigo) AND (disciplina = 5,745))
  • Filter: (((modalidadedisciplina)::text = 'ON_LINE'::text) AND ((definicoestutoriaonline)::text = 'DINAMICA'::text))
Planning time : 31.902 ms
Execution time : 17,431.602 ms