explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ksv1

Settings
# exclusive inclusive rows x rows loops node
1. 0.038 1,307.419 ↓ 1.0 234 1

Unique (cost=3,092,926.56..3,092,928.80 rows=224 width=29) (actual time=1,307.371..1,307.419 rows=234 loops=1)

2. 0.173 1,307.381 ↓ 1.0 234 1

Sort (cost=3,092,926.56..3,092,927.12 rows=224 width=29) (actual time=1,307.371..1,307.381 rows=234 loops=1)

  • Sort Key: unidadeensino.nome, turma.identificadorturma, turma.codigo
  • Sort Method: quicksort Memory: 43kB
3. 0.059 1,307.208 ↓ 1.0 234 1

Group (cost=3,092,916.13..3,092,917.81 rows=224 width=29) (actual time=1,307.137..1,307.208 rows=234 loops=1)

  • Group Key: turma.codigo, unidadeensino.nome
4. 0.172 1,307.149 ↓ 1.0 234 1

Sort (cost=3,092,916.13..3,092,916.69 rows=224 width=29) (actual time=1,307.136..1,307.149 rows=234 loops=1)

  • Sort Key: turma.codigo, unidadeensino.nome
  • Sort Method: quicksort Memory: 43kB
5. 1.397 1,306.977 ↓ 1.0 234 1

Nested Loop (cost=16,267.07..3,092,907.39 rows=224 width=29) (actual time=36.661..1,306.977 rows=234 loops=1)

6. 0.625 182.895 ↓ 6.6 1,487 1

Hash Left Join (cost=3,389.38..208,298.25 rows=224 width=47) (actual time=34.504..182.895 rows=1,487 loops=1)

  • Hash Cond: (unidadeensino.configuracoes = configuracoes.codigo)
7. 0.763 182.261 ↓ 6.6 1,487 1

Hash Left Join (cost=3,387.33..208,293.12 rows=224 width=47) (actual time=34.486..182.261 rows=1,487 loops=1)

  • Hash Cond: (turma.unidadeensino = unidadeensino.codigo)
8. 3.099 181.461 ↓ 6.6 1,487 1

Hash Left Join (cost=3,378.31..208,283.49 rows=224 width=31) (actual time=34.446..181.461 rows=1,487 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: 21
9. 1.341 85.100 ↓ 2.2 1,508 1

Nested Loop Left Join (cost=2,965.57..207,868.95 rows=686 width=39) (actual time=33.810..85.100 rows=1,508 loops=1)

10. 8.067 80.745 ↓ 2.2 1,507 1

Hash Left Join (cost=2,965.29..207,607.29 rows=686 width=35) (actual time=33.800..80.745 rows=1,507 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: 34520
11. 7.586 72.677 ↓ 1.1 36,027 1

Hash Left Join (cost=2,948.09..202,343.50 rows=33,489 width=59) (actual time=33.741..72.677 rows=36,027 loops=1)

  • Hash Cond: (gradecurriculargrupooptativadisciplina.codigo = gdcgo.gradecurriculargrupooptativadisciplina)
  • Join Filter: (NOT (alternatives: SubPlan 3 or hashed SubPlan 4))
12. 7.186 65.089 ↓ 1.1 36,027 1

Hash Left Join (cost=2,930.89..3,155.67 rows=33,489 width=55) (actual time=33.732..65.089 rows=36,027 loops=1)

  • Hash Cond: (turmadisciplina.gradecurriculargrupooptativadisciplina = gradecurriculargrupooptativadisciplina.codigo)
13. 13.749 57.894 ↓ 1.1 36,027 1

Hash Left Join (cost=2,929.37..3,066.24 rows=33,489 width=51) (actual time=33.714..57.894 rows=36,027 loops=1)

  • Hash Cond: (turmadisciplina.gradedisciplina = gradedisciplina.codigo)
14. 10.718 41.826 ↓ 1.1 36,027 1

Hash Right Join (cost=2,517.01..2,565.94 rows=33,489 width=47) (actual time=31.360..41.826 rows=36,027 loops=1)

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

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

  • Hash Cond: (turmadisciplinacomposta.gradedisciplinacomposta = gradedisciplinacomposta.codigo)
16. 0.004 0.004 ↓ 0.0 0 1

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

17. 0.000 0.000 ↓ 0.0 0

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

18. 0.000 0.000 ↓ 0.0 0

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

19. 7.465 31.104 ↓ 1.1 36,027 1

Hash (cost=2,081.20..2,081.20 rows=33,489 width=39) (actual time=31.104..31.104 rows=36,027 loops=1)

  • Buckets: 65536 Batches: 1 Memory Usage: 3151kB
20. 10.974 23.639 ↓ 1.1 36,027 1

Hash Join (cost=195.58..2,081.20 rows=33,489 width=39) (actual time=1.821..23.639 rows=36,027 loops=1)

  • Hash Cond: (turmadisciplina.turma = turma.codigo)
21. 10.870 10.870 ↓ 1.0 71,883 1

Seq Scan on turmadisciplina (cost=0.00..1,696.77 rows=71,879 width=20) (actual time=0.008..10.870 rows=71,883 loops=1)

  • Filter: permitereposicao
  • Rows Removed by Filter: 394
22. 0.370 1.795 ↓ 1.0 2,232 1

Hash (cost=167.73..167.73 rows=2,228 width=23) (actual time=1.795..1.795 rows=2,232 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 153kB
23. 1.425 1.425 ↓ 1.0 2,232 1

Seq Scan on turma (cost=0.00..167.73 rows=2,228 width=23) (actual time=0.005..1.425 rows=2,232 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
24. 1.028 2.319 ↑ 1.0 10,416 1

Hash (cost=282.16..282.16 rows=10,416 width=8) (actual time=2.319..2.319 rows=10,416 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 535kB
25. 1.291 1.291 ↑ 1.0 10,416 1

Seq Scan on gradedisciplina (cost=0.00..282.16 rows=10,416 width=8) (actual time=0.004..1.291 rows=10,416 loops=1)

26. 0.003 0.009 ↑ 1.0 23 1

Hash (cost=1.23..1.23 rows=23 width=8) (actual time=0.009..0.009 rows=23 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
27. 0.006 0.006 ↑ 1.0 23 1

Seq Scan on gradecurriculargrupooptativadisciplina (cost=0.00..1.23 rows=23 width=8) (actual time=0.004..0.006 rows=23 loops=1)

28. 0.000 0.002 ↓ 0.0 0 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
29. 0.002 0.002 ↓ 0.0 0 1

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

30.          

SubPlan (for Hash Left Join)

31. 0.000 0.000 ↓ 0.0 0

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

  • Filter: (turmadisciplina = turmadisciplina.codigo)
32. 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)

33. 0.000 0.001 ↓ 0.0 0 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
34. 0.001 0.001 ↓ 0.0 0 1

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

35.          

SubPlan (for Hash Left Join)

36. 0.000 0.000 ↓ 0.0 0

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

  • Filter: (turmadisciplina = turmadisciplina.codigo)
37. 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)

38. 3.014 3.014 ↑ 1.0 1 1,507

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

  • 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)))
39. 0.118 0.386 ↓ 1.1 1,094 1

Hash (cost=400.14..400.14 rows=1,008 width=12) (actual time=0.386..0.386 rows=1,094 loops=1)

  • Buckets: 2048 (originally 1024) Batches: 1 (originally 1) Memory Usage: 64kB
40. 0.268 0.268 ↓ 1.1 1,094 1

Index Scan using ch_vagaturmadisciplina_disciplina on vagaturmadisciplina (cost=0.29..400.14 rows=1,008 width=12) (actual time=0.005..0.268 rows=1,094 loops=1)

  • Index Cond: (disciplina = 5745)
41.          

SubPlan (for Hash Left Join)

42. 4.494 71.904 ↑ 1.0 1 1,498

Aggregate (cost=144.22..144.23 rows=1 width=8) (actual time=0.048..0.048 rows=1 loops=1,498)

43. 1.914 67.410 ↓ 0.0 0 1,498

Nested Loop (cost=2.40..144.22 rows=1 width=4) (actual time=0.033..0.045 rows=0 loops=1,498)

  • 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
44. 0.208 62.916 ↓ 0.0 0 1,498

Nested Loop (cost=1.97..76.82 rows=1 width=16) (actual time=0.031..0.042 rows=0 loops=1,498)

  • Join Filter: (conf.codigo = confg.configuracoes)
45. 0.853 61.418 ↓ 0.0 0 1,498

Nested Loop (cost=1.97..75.80 rows=1 width=24) (actual time=0.031..0.041 rows=0 loops=1,498)

  • Join Filter: (ue.configuracoes = conf.codigo)
46. 2.351 59.920 ↓ 0.0 0 1,498

Nested Loop (cost=1.97..74.78 rows=1 width=20) (actual time=0.030..0.040 rows=0 loops=1,498)

47. 0.208 56.924 ↓ 0.0 0 1,498

Nested Loop (cost=1.82..74.62 rows=1 width=20) (actual time=0.029..0.038 rows=0 loops=1,498)

48. 0.208 55.426 ↓ 0.0 0 1,498

Nested Loop (cost=1.54..66.31 rows=1 width=24) (actual time=0.028..0.037 rows=0 loops=1,498)

  • 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
49. 1.269 53.928 ↓ 0.0 0 1,498

Nested Loop (cost=1.27..65.99 rows=1 width=30) (actual time=0.027..0.036 rows=0 loops=1,498)

50. 0.818 49.434 ↓ 0.0 0 1,498

Nested Loop (cost=0.85..65.35 rows=1 width=32) (actual time=0.026..0.033 rows=0 loops=1,498)

51. 46.438 46.438 ↓ 0.0 0 1,498

Index Scan using matriculaperiodoturmadisciplina_turma_disciplina_matricula on matriculaperiodoturmadisciplina mptd (cost=0.43..56.91 rows=1 width=12) (actual time=0.024..0.031 rows=0 loops=1,498)

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

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

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

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

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

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

  • Index Cond: (codigo = m.curso)
55. 1.290 1.290 ↑ 1.0 1 645

Index Only Scan using turma_pkey on turma t_5 (cost=0.28..8.30 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=645)

  • Index Cond: (codigo = turma.codigo)
  • Heap Fetches: 645
56. 0.645 0.645 ↑ 1.0 1 645

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

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

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

58. 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)

59. 2.580 2.580 ↑ 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.004..0.004 rows=1 loops=645)

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

SubPlan (for Nested Loop)

61. 0.000 0.000 ↓ 0.0 0

Limit (cost=24.22..28.25 rows=1 width=4) (never executed)

62. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico his (cost=24.22..28.25 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))
63. 0.000 0.000 ↓ 0.0 0

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

64. 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)
65. 0.000 0.000 ↓ 0.0 0

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

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

Limit (cost=24.22..28.25 rows=1 width=4) (never executed)

67. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico his_1 (cost=24.22..28.25 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))
68. 0.000 0.000 ↓ 0.0 0

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

69. 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)
70. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (disciplina = h.disciplina)
71. 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
72. 0.000 20.972 ↑ 1.0 1 1,498

Aggregate (cost=121.68..121.69 rows=1 width=8) (actual time=0.014..0.014 rows=1 loops=1,498)

73. 1.399 20.972 ↓ 0.0 0 1,498

Nested Loop Left Join (cost=2.39..121.68 rows=1 width=4) (actual time=0.014..0.014 rows=0 loops=1,498)

  • Join Filter: requerimento.disciplinaporequivalencia
  • Filter: ((requerimento.disciplina = 5745) OR (mapaequivalenciadisciplinacursada.disciplina = 5745))
  • Rows Removed by Filter: 0
74. 0.000 19.474 ↓ 0.0 0 1,498

Nested Loop Left Join (cost=2.11..113.37 rows=1 width=13) (actual time=0.013..0.013 rows=0 loops=1,498)

  • Filter: (((requerimento.situacaofinanceira)::text = 'IS'::text) OR (contareceber.codigo IS NULL) OR (contareceber.datavencimento <= CURRENT_DATE))
75. 0.904 19.474 ↓ 0.0 0 1,498

Nested Loop (cost=1.68..104.90 rows=1 width=20) (actual time=0.012..0.013 rows=0 loops=1,498)

  • 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)
76. 1.003 17.976 ↓ 0.0 0 1,498

Nested Loop (cost=1.26..93.92 rows=1 width=57) (actual time=0.012..0.012 rows=0 loops=1,498)

77. 0.000 16.478 ↓ 0.0 0 1,498

Nested Loop (cost=0.84..85.48 rows=1 width=43) (actual time=0.011..0.011 rows=0 loops=1,498)

78. 0.000 16.478 ↓ 0.0 0 1,498

Nested Loop (cost=0.56..77.17 rows=1 width=45) (actual time=0.011..0.011 rows=0 loops=1,498)

79. 16.478 16.478 ↓ 0.0 0 1,498

Index Scan using idx_requerimento_turmareposicao on requerimento (cost=0.42..63.66 rows=1 width=49) (actual time=0.010..0.011 rows=0 loops=1,498)

  • Index Cond: (turmareposicao = turma.codigo)
  • Filter: ((situacao)::text <> ALL ('{FD,FI}'::text[]))
  • Rows Removed by Filter: 9
80. 0.198 0.198 ↑ 1.0 1 99

Index Scan using tiporequerimento_pkey on tiporequerimento (cost=0.14..8.16 rows=1 width=4) (actual time=0.002..0.002 rows=1 loops=99)

  • Index Cond: (codigo = requerimento.tiporequerimento)
  • Filter: ((tipo)::text = 'RE'::text)
81. 0.198 0.198 ↑ 1.0 1 99

Index Scan using turma_pkey on turma turmareposicao (cost=0.28..8.30 rows=1 width=6) (actual time=0.002..0.002 rows=1 loops=99)

  • Index Cond: (codigo = turma.codigo)
82. 0.495 0.495 ↑ 1.0 1 99

Index Scan using matricula_pkey on matricula mat (cost=0.42..8.44 rows=1 width=14) (actual time=0.005..0.005 rows=1 loops=99)

  • Index Cond: ((matricula)::text = (requerimento.matricula)::text)
  • Filter: ((situacao)::text = 'AT'::text)
83. 0.594 0.594 ↑ 1.0 1 99

Index Scan using idx_matriculaperiodo_matricula_ano_semestre on matriculaperiodo matper (cost=0.42..2.50 rows=1 width=24) (actual time=0.006..0.006 rows=1 loops=99)

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

SubPlan (for Nested Loop)

85. 0.000 0.000 ↓ 0.0 0

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

86. 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
87. 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)
88. 0.396 0.396 ↑ 1.0 1 99

Index Scan using contareceber_pkey on contareceber (cost=0.43..8.45 rows=1 width=12) (actual time=0.004..0.004 rows=1 loops=99)

  • Index Cond: (codigo = requerimento.contareceber)
89. 0.099 0.099 ↓ 0.0 0 99

Index Scan using pk_mapaequivalenciadisciplinacursada_codigo on mapaequivalenciadisciplinacursada (cost=0.28..8.30 rows=1 width=8) (actual time=0.001..0.001 rows=0 loops=99)

  • Index Cond: (codigo = requerimento.mapaequivalenciadisciplinacursada)
90. 0.012 0.037 ↑ 1.2 77 1

Hash (cost=7.90..7.90 rows=90 width=24) (actual time=0.037..0.037 rows=77 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
91. 0.025 0.025 ↑ 1.2 77 1

Seq Scan on unidadeensino (cost=0.00..7.90 rows=90 width=24) (actual time=0.003..0.025 rows=77 loops=1)

92. 0.002 0.009 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
93. 0.003 0.007 ↑ 1.0 1 1

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

  • Join Filter: (configuracaogeralsistema.configuracoes = configuracoes.codigo)
94. 0.002 0.002 ↑ 1.0 1 1

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

95. 0.002 0.002 ↑ 1.0 1 1

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

96. 1.487 1,122.685 ↓ 0.0 0 1,487

Limit (cost=12,877.69..12,877.70 rows=1 width=4) (actual time=0.755..0.755 rows=0 loops=1,487)

97. 2.974 1,121.198 ↓ 0.0 0 1,487

HashAggregate (cost=12,877.69..12,880.76 rows=307 width=4) (actual time=0.754..0.754 rows=0 loops=1,487)

  • Group Key: ht.turma
98. 2.974 1,118.224 ↓ 0.0 0 1,487

Append (cost=1.12..12,876.92 rows=307 width=4) (actual time=0.629..0.752 rows=0 loops=1,487)

99. 1.487 95.168 ↓ 0.0 0 1,487

Unique (cost=1.12..61.50 rows=1 width=4) (actual time=0.050..0.064 rows=0 loops=1,487)

100. 6.461 93.681 ↑ 1.0 1 1,487

Nested Loop (cost=1.12..61.50 rows=1 width=4) (actual time=0.050..0.063 rows=1 loops=1,487)

101. 2.704 50.558 ↑ 1.3 12 1,487

Nested Loop (cost=0.70..49.00 rows=16 width=8) (actual time=0.018..0.034 rows=12 loops=1,487)

102. 2.974 2.974 ↑ 1.0 1 1,487

Index Scan using ch_horarioturma_turma_ano_semestre on horarioturma ht (cost=0.28..8.30 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,487)

  • 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)))
103. 44.880 44.880 ↓ 1.1 20 935

Index Scan using fk_horarioturmadia_horarioturma on horarioturmadia htd (cost=0.42..40.52 rows=18 width=8) (actual time=0.025..0.048 rows=20 loops=935)

  • 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: 37
104. 36.662 36.662 ↓ 0.0 0 18,331

Index Scan using idx_horturdiaitem_horturmdia on horarioturmadiaitem htdi (cost=0.42..0.77 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=18,331)

  • 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
105. 1.487 7.435 ↓ 0.0 0 1,487

Unique (cost=39.73..39.74 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=1,487)

106. 1.487 5.948 ↓ 0.0 0 1,487

Sort (cost=39.73..39.74 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=1,487)

  • Sort Key: t.codigo
  • Sort Method: quicksort Memory: 25kB
107. 0.000 4.461 ↓ 0.0 0 1,487

Nested Loop (cost=5.45..39.72 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=1,487)

108. 0.000 4.461 ↓ 0.0 0 1,487

Nested Loop (cost=5.03..27.22 rows=16 width=8) (actual time=0.003..0.003 rows=0 loops=1,487)

109. 1.487 4.461 ↓ 0.0 0 1,487

Nested Loop (cost=4.59..23.07 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=1,487)

110. 1.487 2.974 ↓ 0.0 0 1,487

Bitmap Heap Scan on turma t (cost=4.31..14.76 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=1,487)

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

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

  • Index Cond: (turmaprincipal = turma.codigo)
112. 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.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)))
113. 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)))
114. 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))
115. 1.487 5.948 ↓ 0.0 0 1,487

Unique (cost=119.92..119.92 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=1,487)

116. 1.487 4.461 ↓ 0.0 0 1,487

Sort (cost=119.92..119.92 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=1,487)

  • Sort Key: t_1.codigo
  • Sort Method: quicksort Memory: 25kB
117. 0.000 2.974 ↓ 0.0 0 1,487

Nested Loop (cost=5.65..119.91 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=1,487)

118. 0.000 2.974 ↓ 0.0 0 1,487

Nested Loop (cost=5.23..94.13 rows=33 width=8) (actual time=0.002..0.002 rows=0 loops=1,487)

119. 0.000 2.974 ↓ 0.0 0 1,487

Nested Loop (cost=4.79..85.83 rows=2 width=8) (actual time=0.002..0.002 rows=0 loops=1,487)

120. 1.487 2.974 ↓ 0.0 0 1,487

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

121. 0.000 1.487 ↓ 0.0 0 1,487

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

  • Recheck Cond: (turma = turma.codigo)
122. 1.487 1.487 ↓ 0.0 0 1,487

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

  • Index Cond: (turma = turma.codigo)
123. 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)))
124. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (codigo = ht_2.turma)
  • Filter: ((situacao)::text = 'AB'::text)
125. 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)))
126. 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))
127. 1.487 17.844 ↓ 0.0 0 1,487

Unique (cost=122.28..122.29 rows=1 width=4) (actual time=0.012..0.012 rows=0 loops=1,487)

128. 1.487 16.357 ↓ 0.0 0 1,487

Sort (cost=122.28..122.29 rows=1 width=4) (actual time=0.011..0.011 rows=0 loops=1,487)

  • Sort Key: t_2.codigo
  • Sort Method: quicksort Memory: 25kB
129. 1.487 14.870 ↓ 0.0 0 1,487

Hash Join (cost=8.03..122.27 rows=1 width=4) (actual time=0.010..0.010 rows=0 loops=1,487)

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

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

131. 0.000 0.000 ↓ 0.0 0

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

132. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=4.79..85.83 rows=2 width=8) (never executed)

133. 0.000 0.000 ↓ 0.0 0

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

134. 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)
135. 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)
136. 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)))
137. 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_3.turma)
  • Filter: ((situacao)::text = 'AB'::text)
138. 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)))
139. 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)
140. 1.487 13.383 ↓ 0.0 0 1,487

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

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
141. 11.896 11.896 ↓ 0.0 0 1,487

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

  • Filter: ((disciplina = 5745) OR (gradedisciplinacomposta.disciplina = disciplina) OR (gdcgd.disciplina = disciplina) OR (gdcgo.disciplina = disciplina))
  • Rows Removed by Filter: 65
142. 1.487 7.435 ↓ 0.0 0 1,487

Unique (cost=36.74..36.74 rows=1 width=4) (actual time=0.005..0.005 rows=0 loops=1,487)

143. 1.487 5.948 ↓ 0.0 0 1,487

Sort (cost=36.74..36.74 rows=1 width=4) (actual time=0.004..0.004 rows=0 loops=1,487)

  • Sort Key: t_3.codigo
  • Sort Method: quicksort Memory: 25kB
144. 0.000 4.461 ↓ 0.0 0 1,487

Nested Loop (cost=10.10..36.73 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=1,487)

145. 0.000 4.461 ↓ 0.0 0 1,487

Nested Loop (cost=9.96..36.22 rows=3 width=8) (actual time=0.003..0.003 rows=0 loops=1,487)

146. 0.000 4.461 ↓ 0.0 0 1,487

Nested Loop (cost=9.54..34.68 rows=2 width=8) (actual time=0.003..0.003 rows=0 loops=1,487)

147. 1.487 4.461 ↓ 0.0 0 1,487

Nested Loop (cost=9.10..30.53 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=1,487)

148. 0.000 2.974 ↓ 0.0 0 1,487

Nested Loop (cost=8.82..30.04 rows=1 width=12) (actual time=0.002..0.002 rows=0 loops=1,487)

149. 1.487 2.974 ↓ 0.0 0 1,487

Nested Loop (cost=8.54..29.65 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=1,487)

150. 0.000 1.487 ↓ 0.0 0 1,487

Bitmap Heap Scan on turma tsub (cost=4.31..14.77 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=1,487)

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

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

  • Index Cond: (turmaprincipal = turma.codigo)
152. 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)
153. 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)
154. 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)))
155. 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_4.turma)
  • Filter: ((situacao)::text = 'AB'::text)
156. 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)))
157. 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)
158. 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
159. 1.487 945.732 ↓ 0.0 0 1,487

Hash Join (cost=3,792.73..12,432.95 rows=301 width=4) (actual time=0.636..0.636 rows=0 loops=1,487)

  • Hash Cond: (htd_5.horarioturma = ht_5.codigo)
  • Join Filter: (SubPlan 11)
160. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=3,461.08..7,160.26 rows=3,875 width=12) (never executed)

  • Hash Cond: (htd_5.codigo = htdi_5.horarioturmadia)
161. 0.000 0.000 ↓ 0.0 0

Seq Scan on horarioturmadia htd_5 (cost=0.00..2,897.62 rows=152,562 width=16) (never executed)

162. 0.000 0.000 ↓ 0.0 0

Hash (cost=3,412.65..3,412.65 rows=3,875 width=4) (never executed)

163. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on horarioturmadiaitem htdi_5 (cost=74.45..3,412.65 rows=3,875 width=4) (never executed)

  • Recheck Cond: (disciplina = 5745)
164. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_horturdiaitem_disciplina (cost=0.00..73.48 rows=3,875 width=0) (never executed)

  • Index Cond: (disciplina = 5745)
165. 0.000 944.245 ↓ 0.0 0 1,487

Hash (cost=325.61..325.61 rows=483 width=12) (actual time=0.635..0.635 rows=0 loops=1,487)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
166. 254.268 944.245 ↓ 0.0 0 1,487

Hash Join (cost=231.33..325.61 rows=483 width=12) (actual time=0.635..0.635 rows=0 loops=1,487)

  • Hash Cond: (ht_5.turma = t_4.codigo)
167. 689.968 689.968 ↓ 1.3 3,104 1,487

Seq Scan on horarioturma ht_5 (cost=0.00..80.36 rows=2,425 width=8) (actual time=0.002..0.464 rows=3,104 loops=1,487)

  • 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)))
168. 0.000 0.009 ↓ 0.0 0 1

Hash (cost=219.43..219.43 rows=952 width=12) (actual time=0.001..0.009 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
169. 0.002 0.009 ↓ 0.0 0 1

Hash Join (cost=183.68..219.43 rows=952 width=12) (actual time=0.001..0.009 rows=0 loops=1)

  • Hash Cond: (turmaagrupada_3.turmaorigem = t_4.codigo)
170. 0.007 0.007 ↓ 0.0 0 1

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

171. 0.000 0.000 ↓ 0.0 0

Hash (cost=155.78..155.78 rows=2,232 width=4) (never executed)

172. 0.000 0.000 ↓ 0.0 0

Seq Scan on turma t_4 (cost=0.00..155.78 rows=2,232 width=4) (never executed)

  • Filter: ((situacao)::text = 'AB'::text)
173.          

SubPlan (for Hash Join)

174. 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 ($35 > 0) THEN $35 ELSE 0 END)::text || ' days'::text))::interval))
175. 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 = $34)
  • Filter: (subturma AND ((tiposubturma)::text = ANY ('{PRATICA,TEORICA}'::text[])) AND ((situacao)::text = 'AB'::text))
176. 0.000 35.688 ↓ 0.0 0 1,487

Nested Loop (cost=0.57..59.16 rows=1 width=4) (actual time=0.024..0.024 rows=0 loops=1,487)

177. 35.688 35.688 ↓ 0.0 0 1,487

Index Scan using unique_programacaotutoriaonline on programacaotutoriaonline (cost=0.28..50.84 rows=1 width=8) (actual time=0.024..0.024 rows=0 loops=1,487)

  • 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)))
178. 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 : 15.305 ms
Execution time : 1,308.958 ms