explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QMo1

Settings
# exclusive inclusive rows x rows loops node
1. 0.063 18,616.133 ↑ 1.1 232 1

Unique (cost=364,687.78..364,691.04 rows=261 width=61) (actual time=18,616.058..18,616.133 rows=232 loops=1)

2. 0.687 18,616.070 ↑ 1.1 232 1

Sort (cost=364,687.78..364,688.43 rows=261 width=61) (actual time=18,616.057..18,616.070 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.600 18,615.383 ↑ 1.1 232 1

GroupAggregate (cost=364,670.78..364,677.30 rows=261 width=61) (actual time=18,614.790..18,615.383 rows=232 loops=1)

  • Group Key: turma.codigo, unidadeensino.nome
4. 0.569 18,614.783 ↑ 1.1 232 1

Sort (cost=364,670.78..364,671.43 rows=261 width=49) (actual time=18,614.760..18,614.783 rows=232 loops=1)

  • Sort Key: turma.codigo, unidadeensino.nome
  • Sort Method: quicksort Memory: 43kB
5. 25.790 18,614.214 ↑ 1.1 232 1

Hash Left Join (cost=3,367.78..364,660.30 rows=261 width=49) (actual time=100.171..18,614.214 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: 1249
6. 2.811 649.677 ↓ 5.6 1,481 1

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

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

Hash Left Join (cost=3,358.01..207,772.83 rows=263 width=39) (actual time=60.180..646.772 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. 4.119 140.679 ↓ 1.9 1,503 1

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

9. 15.470 129.050 ↓ 1.9 1,502 1

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

  • Hash Cond: (gradedisciplina.codigo = gdcgd.gradedisciplina)
  • Join Filter: (NOT (alternatives: SubPlan 1 or hashed SubPlan 2))
  • Filter: (((turmadisciplina.disciplina = 5745) AND (gradedisciplina.cargahoraria = 24)) OR ((turmadisciplina.disciplina = 5745) AND (gradecurriculargrupooptativadisciplina.cargahoraria = 24)) OR ((gdcgd.disciplina = 5745) AND (gdcgd.cargahoraria = 24)) OR ((gdcgo.disciplina = 5745) AND (gdcgo.cargahoraria = 24)) OR ((gradedisciplinacomposta.disciplina = 5745) AND (gradedisciplinacomposta.cargahoraria = 24)))
  • Rows Removed by Filter: 34418
10. 8.088 113.566 ↓ 1.1 35,920 1

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

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

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

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

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

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

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

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

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

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

Seq Scan on turmadisciplinacomposta (cost=0.00..28.50 rows=1,850 width=8) (actual time=0.025..0.025 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.066 51.711 ↓ 1.1 35,920 1

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

  • Buckets: 65536 Batches: 1 Memory Usage: 3270kB
19. 14.710 40.645 ↓ 1.1 35,920 1

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

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

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

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

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

  • Buckets: 4096 Batches: 1 Memory Usage: 159kB
22. 2.779 2.779 ↓ 1.0 2,226 1

Seq Scan on turma (cost=0.00..166.64 rows=2,222 width=23) (actual time=0.018..2.779 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: 2550
23. 1.667 4.786 ↑ 1.0 10,392 1

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

  • Buckets: 16384 Batches: 1 Memory Usage: 575kB
24. 3.119 3.119 ↑ 1.0 10,392 1

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

25. 0.006 0.040 ↑ 1.0 23 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
26. 0.034 0.034 ↑ 1.0 23 1

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

27. 0.000 0.007 ↓ 0.0 0 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
28. 0.007 0.007 ↓ 0.0 0 1

Seq Scan on gradedisciplinacomposta gdcgo (cost=0.00..13.20 rows=320 width=12) (actual time=0.007..0.007 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.001 0.014 ↓ 0.0 0 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
33. 0.013 0.013 ↓ 0.0 0 1

Seq Scan on gradedisciplinacomposta gdcgd (cost=0.00..13.20 rows=320 width=12) (actual time=0.013..0.013 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.005..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.198 1.294 ↓ 1.0 1,093 1

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

  • Buckets: 2048 Batches: 1 Memory Usage: 63kB
39. 1.096 1.096 ↓ 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.035..1.096 rows=1,093 loops=1)

  • Index Cond: (disciplina = 5745)
40.          

SubPlan (for Hash Left Join)

41. 26.856 426.712 ↑ 1.0 1 1,492

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

42. 2.828 399.856 ↓ 0.0 0 1,492

Nested Loop (cost=2.52..136.19 rows=1 width=4) (actual time=0.212..0.268 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 378.968 ↓ 0.0 0 1,492

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

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

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

45. 2.541 365.540 ↓ 0.0 0 1,492

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

46. 1.896 361.064 ↓ 0.0 0 1,492

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

47. 2.743 356.588 ↓ 0.0 0 1,492

Nested Loop (cost=1.54..63.10 rows=1 width=24) (actual time=0.190..0.239 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. 2.991 350.620 ↓ 0.0 0 1,492

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

49. 3.384 323.764 ↓ 0.0 0 1,492

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

50. 305.860 305.860 ↓ 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.164..0.205 rows=0 loops=1,492)

  • Index Cond: ((turma = turma.codigo) AND (disciplina = 5745))
  • Filter: reposicao
  • Rows Removed by Filter: 35
51. 14.520 14.520 ↑ 1.0 1 726

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

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

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

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

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

  • Index Cond: (codigo = m.curso)
54. 2.580 2.580 ↑ 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.004..0.004 rows=1 loops=645)

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

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

  • Index Cond: (codigo = m.unidadeensino)
56. 1.290 1.290 ↑ 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.002..0.002 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.002..0.002 rows=1 loops=645)

58. 18.060 18.060 ↑ 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.028..0.028 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. 2.984 65.648 ↑ 1.0 1 1,492

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

72. 0.000 62.664 ↓ 0.0 0 1,492

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

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

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

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

Nested Loop (cost=1.68..107.88 rows=1 width=20) (actual time=0.041..0.041 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 59.680 ↓ 0.0 0 1,492

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

76. 0.000 58.188 ↓ 0.0 0 1,492

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

77. 2.984 58.188 ↓ 0.0 0 1,492

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

78. 55.204 55.204 ↓ 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.037..0.037 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.026 0.094 ↑ 1.0 77 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
90. 0.068 0.068 ↑ 1.0 77 1

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

91. 0.009 0.050 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
92. 0.005 0.041 ↑ 1.0 1 1

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

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

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

94. 0.008 0.008 ↑ 1.0 1 1

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

95.          

SubPlan (for Hash Left Join)

96. 12.019 202.897 ↓ 0.0 0 1,481

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

97. 3.755 130.328 ↑ 2.0 8 1,481

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

98. 7.405 7.405 ↑ 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.005..0.005 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. 119.168 119.168 ↑ 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.076..0.128 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. 60.550 60.550 ↓ 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.005..0.005 rows=0 loops=12,110)

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

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

102. 1.249 26.229 ↓ 0.0 0 1,249

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

103. 17.486 24.980 ↓ 0.0 0 1,249

Nested Loop (cost=4.59..23.07 rows=1 width=4) (actual time=0.020..0.020 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 = 5745) OR (gradedisciplinacomposta.disciplina = disciplina) OR (gdcgd.disciplina = disciplina) OR (gdcgo.disciplina = disciplina))
109. 1.249 16.237 ↓ 0.0 0 1,249

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

110. 1.249 14.988 ↓ 0.0 0 1,249

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

111. 1.249 13.739 ↓ 0.0 0 1,249

Nested Loop (cost=4.79..85.82 rows=2 width=4) (actual time=0.011..0.011 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 = 5745) OR (gradedisciplinacomposta.disciplina = disciplina) OR (gdcgd.disciplina = disciplina) OR (gdcgo.disciplina = disciplina))
119. 7.494 33.723 ↓ 0.0 0 1,249

Hash Join (cost=8.03..122.28 rows=1 width=0) (actual time=0.027..0.027 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 26.229 ↓ 0.0 0 1,249

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

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

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

  • Filter: ((disciplina = 5745) OR (gradedisciplinacomposta.disciplina = disciplina) OR (gdcgd.disciplina = disciplina) OR (gdcgo.disciplina = disciplina))
  • Rows Removed by Filter: 65
132. 1.249 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. 0.000 12.490 ↓ 0.0 0 1,249

Nested Loop (cost=9.96..36.21 rows=3 width=4) (actual time=0.010..0.010 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. 1.249 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. 0.000 9.992 ↓ 0.0 0 1,249

Nested Loop (cost=8.82..30.03 rows=1 width=12) (actual time=0.008..0.008 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 = 5745) AND (equivalente = htdi_4.disciplina))
  • Heap Fetches: 0
147. 1.249 17,590.916 ↓ 0.0 0 1,249

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

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

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

149. 1,014.188 4,245.351 ↑ 11.6 4,798 1,249

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

150. 168.615 1,617.455 ↑ 14.8 76 1,249

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

  • Merge Cond: (ht_5.turma = t_5.codigo)
151. 684.452 684.452 ↑ 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.548 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. 764.388 764.388 ↑ 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.038..0.612 rows=79 loops=1,249)

  • Filter: ((situacao)::text = 'AB'::text)
  • Rows Removed by Filter: 1819
153. 1,613.708 1,613.708 ↓ 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.017 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 = 5745)
  • 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 53.707 ↓ 0.0 0 1,249

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

160. 52.458 52.458 ↓ 0.0 0 1,249

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

  • Index Cond: ((turma = turma.codigo) AND (disciplina = 5745))
  • 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 = 5745))
  • Filter: (((modalidadedisciplina)::text = 'ON_LINE'::text) AND ((definicoestutoriaonline)::text = 'DINAMICA'::text))
Planning time : 32.232 ms
Execution time : 18,618.157 ms