explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oxc

Settings
# exclusive inclusive rows x rows loops node
1. 0.010 17,877.572 ↑ 1.0 1 1

Aggregate (cost=589,054.98..589,054.99 rows=1 width=32) (actual time=17,877.572..17,877.572 rows=1 loops=1)

  • Functions: 856
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 184.045 ms, Inlining 453.189 ms, Optimization 13562.002 ms, Emission 9078.045 ms, Total 23277.281 ms
2. 0.000 17,877.562 ↓ 0.0 0 1

Unique (cost=589,054.92..589,054.96 rows=1 width=492) (actual time=17,877.562..17,877.562 rows=0 loops=1)

3. 0.067 17,877.562 ↓ 0.0 0 1

Sort (cost=589,054.92..589,054.92 rows=1 width=492) (actual time=17,877.562..17,877.562 rows=0 loops=1)

  • Sort Key: (min(atividadediscursivarespostaaluno.datalimiteentrega)), atividadediscursiva.codigo, atividadediscursiva.datalimiteentrega, atividadediscursiva.enunciado, turma.codigo, turma.identificadorturma, disciplina.codigo, disciplina.nome, atividadediscursiva.ano, atividadediscursiva.semestre, (sum(CASE WHEN ((atividadediscursivarespostaaluno.situacaorespostaatividadediscursiva)::text = 'AGUARDANDO_AVALIACAO_PROFESSOR'::text) THEN 1 ELSE 0 END)), (sum(CASE WHEN ((atividadediscursivarespostaaluno.situacaorespostaatividadediscursiva)::text = 'AGUARDANDO_NOVA_RESPOSTA'::text) THEN 1 ELSE 0 END)), (sum(CASE WHEN ((atividadediscursivarespostaaluno.situacaorespostaatividadediscursiva)::text = 'AVALIADO'::text) THEN 1 ELSE 0 END)), ((SubPlan 12)), (sum(CASE WHEN (alternatives: SubPlan 13 or hashed SubPlan 14) THEN 1 ELSE 0 END))
  • Sort Method: quicksort Memory: 25kB
4. 0.002 17,877.495 ↓ 0.0 0 1

GroupAggregate (cost=42,255.30..589,054.91 rows=1 width=492) (actual time=17,877.494..17,877.495 rows=0 loops=1)

  • Group Key: atividadediscursiva.codigo, turma.codigo, disciplina.codigo
5. 0.005 17,877.493 ↓ 0.0 0 1

Sort (cost=42,255.30..42,255.30 rows=1 width=498) (actual time=17,877.493..17,877.493 rows=0 loops=1)

  • Sort Key: atividadediscursiva.codigo, turma.codigo, disciplina.codigo
  • Sort Method: quicksort Memory: 25kB
6. 0.000 17,877.488 ↓ 0.0 0 1

Nested Loop (cost=22,276.70..42,255.29 rows=1 width=498) (actual time=17,877.488..17,877.488 rows=0 loops=1)

  • Join Filter: (atividadediscursiva.codigo = atividadediscursiva_1.codigo)
7. 1.162 16,766.053 ↓ 865.0 865 1

Nested Loop (cost=1,002.28..20,980.84 rows=1 width=502) (actual time=16,746.158..16,766.053 rows=865 loops=1)

8. 1.172 16,763.161 ↓ 865.0 865 1

Nested Loop (cost=1,002.00..20,980.50 rows=1 width=464) (actual time=16,746.129..16,763.161 rows=865 loops=1)

  • Join Filter: (((matriculaperiodoturmadisciplina.disciplina = atividadediscursiva.disciplina) OR (turma.turmaagrupada AND (SubPlan 15))) AND ((((matriculaperiodoturmadisciplina.modalidadedisciplina)::text = 'ON_LINE'::text) AND (matriculaperiodoturmadisciplina.professor = 83102) AND ((atividadediscursiva.publicoalvo)::text = 'TURMA'::text) AND (matriculaperiodoturmadisciplina.turma = atividadediscursiva.turma)) OR (((matriculaperiodoturmadisciplina.modalidadedisciplina)::text <> 'ON_LINE'::text) AND ((atividadediscursiva.publicoalvo)::text = 'TURMA'::text) AND (((matriculaperiodoturmadisciplina.turmapratica IS NOT NULL) AND turma.subturma AND ((turma.tiposubturma)::text = 'PRATICA'::text) AND (turma.codigo = matriculaperiodoturmadisciplina.turmapratica)) OR ((matriculaperiodoturmadisciplina.turmateorica IS NOT NULL) AND turma.subturma AND ((turma.tiposubturma)::text = 'TEORICA'::text) AND (turma.codigo = matriculaperiodoturmadisciplina.turmateorica)) OR (turma.turmaagrupada AND (alternatives: SubPlan 16 or hashed SubPlan 17)) OR ((matriculaperiodoturmadisciplina.turmapratica IS NOT NULL) AND turma.turmaagrupada AND (alternatives: SubPlan 18 or hashed SubPlan 19)) OR ((matriculaperiodoturmadisciplina.turmateorica IS NOT NULL) AND turma.turmaagrupada AND (alternatives: SubPlan 20 or hashed SubPlan 21)) OR ((NOT turma.turmaagrupada) AND (NOT turma.subturma) AND (matriculaperiodoturmadisciplina.turma = turma.codigo)))) OR ((matriculaperiodoturmadisciplina.codigo = atividadediscursiva.matriculaperiodoturmadisciplina) AND ((atividadediscursiva.publicoalvo)::text = 'ALUNO'::text))))
9. 1.815 16,758.889 ↓ 865.0 865 1

Nested Loop (cost=1,001.71..20,943.79 rows=1 width=466) (actual time=16,746.102..16,758.889 rows=865 loops=1)

  • Join Filter: (((matricula.gradecurricularatual = historico.matrizcurricular) AND ((historico.historicocursandoporcorrespondenciaapostransferencia IS NULL) OR (NOT historico.historicocursandoporcorrespondenciaapostransferencia)) AND ((historico.transferenciamatrizcurricularmatricula IS NULL) OR ((historico.transferenciamatrizcurricularmatricula IS NOT NULL) AND (NOT (SubPlan 22))))) OR ((matricula.gradecurricularatual <> historico.matrizcurricular) AND historico.historicocursandoporcorrespondenciaapostransferencia AND (historico.transferenciamatrizcurricularmatricula IS NOT NULL) AND (historico.disciplina = (SubPlan 23)) AND ((NOT historico.historicoporequivalencia) OR (historico.historicoporequivalencia IS NULL))) OR ((matricula.gradecurricularatual <> historico.matrizcurricular) AND historico.historicoequivalente AND (SubPlan 24)) OR ((historico.matrizcurricular = matriculaperiodo.gradecurricular) AND (matricula.gradecurricularatual <> historico.matrizcurricular) AND historico.historicodisciplinafazpartecomposicao AND (NOT (SubPlan 25))))
10. 1.024 16,750.154 ↓ 865.0 865 1

Nested Loop (cost=1,001.42..20,751.51 rows=1 width=521) (actual time=16,746.070..16,750.154 rows=865 loops=1)

11. 11,668.905 16,746.535 ↓ 865.0 865 1

Gather (cost=1,001.14..20,751.20 rows=1 width=122) (actual time=16,746.021..16,746.535 rows=865 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
12. 0.091 5,077.630 ↓ 216.0 216 4 / 4

Nested Loop (cost=1.14..19,751.10 rows=1 width=122) (actual time=5,041.937..5,077.630 rows=216 loops=4)

  • Join Filter: (matriculaperiodoturmadisciplina.codigo = atividadediscursivarespostaaluno.matriculaperiodoturmadisciplina)
13. 0.037 5,076.328 ↓ 21.0 42 4 / 4

Nested Loop (cost=0.85..19,750.17 rows=2 width=94) (actual time=5,041.904..5,076.328 rows=42 loops=4)

14. 0.066 5,075.874 ↓ 21.0 42 4 / 4

Nested Loop (cost=0.42..19,733.81 rows=2 width=48) (actual time=5,041.863..5,075.874 rows=42 loops=4)

15. 5,075.182 5,075.182 ↑ 1.7 90 4 / 4

Parallel Seq Scan on matriculaperiodoturmadisciplina (cost=0.00..18,670.49 rows=154 width=48) (actual time=5,039.155..5,075.182 rows=90 loops=4)

  • Filter: (professor = 83102)
  • Rows Removed by Filter: 254823
16. 0.627 0.627 ↓ 0.0 0 358 / 4

Index Scan using matriculaperiodo_pkey on matriculaperiodo (cost=0.42..6.90 rows=1 width=8) (actual time=0.007..0.007 rows=0 loops=358)

  • Index Cond: (codigo = matriculaperiodoturmadisciplina.matriculaperiodo)
  • Filter: (((ano)::text = '2020'::text) AND ((semestre)::text = '1'::text))
  • Rows Removed by Filter: 1
17. 0.417 0.417 ↑ 1.0 1 167 / 4

Index Scan using index_historico_matriculaperiodoturmadisciplina on historico (cost=0.43..8.17 rows=1 width=46) (actual time=0.010..0.010 rows=1 loops=167)

  • Index Cond: (matriculaperiodoturmadisciplina = matriculaperiodoturmadisciplina.codigo)
18. 1.211 1.211 ↑ 1.0 5 167 / 4

Index Scan using ch_atividadediscursivarespostaaluno_matriculaperiodoturmadiscip on atividadediscursivarespostaaluno (cost=0.29..0.40 rows=5 width=36) (actual time=0.011..0.029 rows=5 loops=167)

  • Index Cond: (matriculaperiodoturmadisciplina = historico.matriculaperiodoturmadisciplina)
19. 2.595 2.595 ↑ 1.0 1 865

Index Scan using atividadediscursiva_pkey on atividadediscursiva (cost=0.28..0.32 rows=1 width=399) (actual time=0.003..0.003 rows=1 loops=865)

  • Index Cond: (codigo = atividadediscursivarespostaaluno.atividadediscursiva)
20. 6.920 6.920 ↑ 1.0 1 865

Index Scan using matricula_pkey on matricula (cost=0.29..4.71 rows=1 width=13) (actual time=0.008..0.008 rows=1 loops=865)

  • Index Cond: ((matricula)::text = (matriculaperiodoturmadisciplina.matricula)::text)
21.          

SubPlan (for Nested Loop)

22. 0.000 0.000 ↓ 0.0 0

Limit (cost=17.71..21.74 rows=1 width=4) (never executed)

23. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico his_4 (cost=17.71..21.74 rows=1 width=4) (never executed)

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

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

25. 0.000 0.000 ↓ 0.0 0

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

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

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

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

Limit (cost=17.71..21.74 rows=1 width=4) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico his_5 (cost=17.71..21.74 rows=1 width=4) (never executed)

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

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

30. 0.000 0.000 ↓ 0.0 0

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

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

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

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

Nested Loop (cost=139.59..143.64 rows=1 width=0) (never executed)

33. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=121.88..121.89 rows=1 width=22) (never executed)

  • Group Key: (his_6.matricula)::text, (his_6.anohistorico)::text, (his_6.semestrehistorico)::text, his_6.disciplina, his_6.transferenciamatrizcurricularmatricula
34. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico his_6 (cost=117.85..121.87 rows=1 width=22) (never executed)

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

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

36. 0.000 0.000 ↓ 0.0 0

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

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

Bitmap Index Scan on ch_historico_gc (cost=0.00..112.77 rows=5,913 width=0) (never executed)

  • Index Cond: (matrizcurricular = matricula.gradecurricularatual)
38. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico hist_1 (cost=17.71..21.74 rows=1 width=22) (never executed)

  • Recheck Cond: (((matricula)::text = (historico.matricula)::text) AND (disciplina = his_6.disciplina))
  • Filter: (historicoporequivalencia AND (historico.mapaequivalenciadisciplina = mapaequivalenciadisciplina) AND (numeroagrupamentoequivalenciadisciplina = historico.numeroagrupamentoequivalenciadisciplina) AND ((his_6.anohistorico)::text = (anohistorico)::text) AND ((his_6.semestrehistorico)::text = (semestrehistorico)::text) AND (his_6.transferenciamatrizcurricularmatricula = transferenciamatrizcurricularmatricula))
39. 0.000 0.000 ↓ 0.0 0

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

40. 0.000 0.000 ↓ 0.0 0

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

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

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

  • Index Cond: (disciplina = his_6.disciplina)
42. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((disciplina = historico.disciplina) AND (matriculaperiodo = historico.matriculaperiodo) AND (matrizcurricular = matricula.gradecurricularatual))
  • Heap Fetches: 0
43. 2.595 2.595 ↑ 1.0 1 865

Index Scan using turma_pkey on turma (cost=0.29..0.53 rows=1 width=33) (actual time=0.003..0.003 rows=1 loops=865)

  • Index Cond: (codigo = atividadediscursiva.turma)
44.          

SubPlan (for Nested Loop)

45. 0.080 0.080 ↑ 1.0 1 16

Seq Scan on disciplinaequivalente disciplinaequivalente_1 (cost=0.00..2.40 rows=1 width=4) (actual time=0.005..0.005 rows=1 loops=16)

  • Filter: (disciplina = atividadediscursiva.disciplina)
  • Rows Removed by Filter: 20
46. 0.170 0.425 ↑ 1.0 1 85

Bitmap Heap Scan on turmaagrupada turmaagrupada_6 (cost=4.30..11.65 rows=1 width=0) (actual time=0.005..0.005 rows=1 loops=85)

  • Recheck Cond: (turmaorigem = turma.codigo)
  • Filter: (turma = matriculaperiodoturmadisciplina.turma)
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=85
47. 0.255 0.255 ↓ 1.3 4 85

Bitmap Index Scan on idx_turmaagrupada_turmaorigem (cost=0.00..4.30 rows=3 width=0) (actual time=0.003..0.003 rows=4 loops=85)

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

Seq Scan on turmaagrupada turmaagrupada_7 (cost=0.00..24.33 rows=1,333 width=8) (never executed)

49. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on turmaagrupada turmaagrupada_8 (cost=4.30..11.65 rows=1 width=0) (never executed)

  • Recheck Cond: (turmaorigem = turma.codigo)
  • Filter: (turma = matriculaperiodoturmadisciplina.turmapratica)
50. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_turmaagrupada_turmaorigem (cost=0.00..4.30 rows=3 width=0) (never executed)

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

Seq Scan on turmaagrupada turmaagrupada_9 (cost=0.00..24.33 rows=1,333 width=8) (never executed)

52. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on turmaagrupada turmaagrupada_10 (cost=4.30..11.65 rows=1 width=0) (never executed)

  • Recheck Cond: (turmaorigem = turma.codigo)
  • Filter: (turma = matriculaperiodoturmadisciplina.turmateorica)
53. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_turmaagrupada_turmaorigem (cost=0.00..4.30 rows=3 width=0) (never executed)

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

Seq Scan on turmaagrupada turmaagrupada_11 (cost=0.00..24.33 rows=1,333 width=8) (never executed)

55. 1.730 1.730 ↑ 1.0 1 865

Index Scan using disciplina_pkey on disciplina (cost=0.28..0.34 rows=1 width=38) (actual time=0.002..0.002 rows=1 loops=865)

  • Index Cond: (codigo = atividadediscursiva.disciplina)
56. 0.865 1,111.525 ↓ 0.0 0 865

Unique (cost=21,274.42..21,274.43 rows=1 width=4) (actual time=1.285..1.285 rows=0 loops=865)

57. 0.000 1,110.660 ↓ 0.0 0 865

Sort (cost=21,274.42..21,274.43 rows=1 width=4) (actual time=1.284..1.284 rows=0 loops=865)

  • Sort Key: atividadediscursiva_1.codigo
  • Sort Method: quicksort Memory: 25kB
58. 0.000 1,110.943 ↓ 0.0 0 1

Nested Loop (cost=1,002.28..21,274.41 rows=1 width=4) (actual time=1,110.943..1,110.943 rows=0 loops=1)

59. 0.001 1,110.943 ↓ 0.0 0 1

Nested Loop (cost=1,002.00..21,274.10 rows=1 width=8) (actual time=1,110.943..1,110.943 rows=0 loops=1)

  • Join Filter: (((matriculaperiodoturmadisciplina_1.disciplina = atividadediscursiva_1.disciplina) OR (turma_1.turmaagrupada AND (SubPlan 26))) AND ((((matriculaperiodoturmadisciplina_1.modalidadedisciplina)::text = 'ON_LINE'::text) AND (matriculaperiodoturmadisciplina_1.professor = 83102) AND ((atividadediscursiva_1.publicoalvo)::text = 'TURMA'::text) AND (matriculaperiodoturmadisciplina_1.turma = atividadediscursiva_1.turma)) OR (((matriculaperiodoturmadisciplina_1.modalidadedisciplina)::text <> 'ON_LINE'::text) AND ((atividadediscursiva_1.publicoalvo)::text = 'TURMA'::text) AND (((matriculaperiodoturmadisciplina_1.turmapratica IS NOT NULL) AND turma_1.subturma AND ((turma_1.tiposubturma)::text = 'PRATICA'::text) AND (turma_1.codigo = matriculaperiodoturmadisciplina_1.turmapratica)) OR ((matriculaperiodoturmadisciplina_1.turmateorica IS NOT NULL) AND turma_1.subturma AND ((turma_1.tiposubturma)::text = 'TEORICA'::text) AND (turma_1.codigo = matriculaperiodoturmadisciplina_1.turmateorica)) OR (turma_1.turmaagrupada AND (alternatives: SubPlan 27 or hashed SubPlan 28)) OR ((matriculaperiodoturmadisciplina_1.turmapratica IS NOT NULL) AND turma_1.turmaagrupada AND (alternatives: SubPlan 29 or hashed SubPlan 30)) OR ((matriculaperiodoturmadisciplina_1.turmateorica IS NOT NULL) AND turma_1.turmaagrupada AND (alternatives: SubPlan 31 or hashed SubPlan 32)) OR ((NOT turma_1.turmaagrupada) AND (NOT turma_1.subturma) AND (matriculaperiodoturmadisciplina_1.turma = turma_1.codigo)))) OR ((matriculaperiodoturmadisciplina_1.codigo = atividadediscursiva_1.matriculaperiodoturmadisciplina) AND ((atividadediscursiva_1.publicoalvo)::text = 'ALUNO'::text))))
60. 0.001 1,110.942 ↓ 0.0 0 1

Nested Loop (cost=1,001.71..21,237.39 rows=1 width=57) (actual time=1,110.942..1,110.942 rows=0 loops=1)

  • Join Filter: (((matricula_1.gradecurricularatual = historico_1.matrizcurricular) AND ((historico_1.historicocursandoporcorrespondenciaapostransferencia IS NULL) OR (NOT historico_1.historicocursandoporcorrespondenciaapostransferencia)) AND ((historico_1.transferenciamatrizcurricularmatricula IS NULL) OR ((historico_1.transferenciamatrizcurricularmatricula IS NOT NULL) AND (NOT (SubPlan 33))))) OR ((matricula_1.gradecurricularatual <> historico_1.matrizcurricular) AND historico_1.historicocursandoporcorrespondenciaapostransferencia AND (historico_1.transferenciamatrizcurricularmatricula IS NOT NULL) AND (historico_1.disciplina = (SubPlan 34)) AND ((NOT historico_1.historicoporequivalencia) OR (historico_1.historicoporequivalencia IS NULL))) OR ((matricula_1.gradecurricularatual <> historico_1.matrizcurricular) AND historico_1.historicoequivalente AND (SubPlan 35)) OR ((historico_1.matrizcurricular = matriculaperiodo_1.gradecurricular) AND (matricula_1.gradecurricularatual <> historico_1.matrizcurricular) AND historico_1.historicodisciplinafazpartecomposicao AND (NOT (SubPlan 36))))
61. 0.001 1,110.941 ↓ 0.0 0 1

Nested Loop (cost=1,001.42..21,045.11 rows=1 width=112) (actual time=1,110.941..1,110.941 rows=0 loops=1)

62. 0.000 1,110.940 ↓ 0.0 0 1

Nested Loop (cost=1,001.14..21,044.79 rows=1 width=94) (actual time=1,110.940..1,110.940 rows=0 loops=1)

  • Join Filter: (matriculaperiodoturmadisciplina_1.codigo = atividadediscursivarespostaaluno_1.matriculaperiodoturmadisciplina)
63. 335.312 1,105.162 ↓ 23.9 167 1

Gather (cost=1,000.85..20,750.87 rows=7 width=94) (actual time=6.118..1,105.162 rows=167 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
64. 0.017 769.850 ↓ 21.0 42 4 / 4

Nested Loop (cost=0.85..19,750.17 rows=2 width=94) (actual time=737.849..769.850 rows=42 loops=4)

65. 0.060 769.541 ↓ 21.0 42 4 / 4

Nested Loop (cost=0.42..19,733.81 rows=2 width=48) (actual time=737.838..769.541 rows=42 loops=4)

66. 769.034 769.034 ↑ 1.7 90 4 / 4

Parallel Seq Scan on matriculaperiodoturmadisciplina matriculaperiodoturmadisciplina_1 (cost=0.00..18,670.49 rows=154 width=48) (actual time=737.033..769.034 rows=90 loops=4)

  • Filter: (professor = 83102)
  • Rows Removed by Filter: 254823
67. 0.448 0.448 ↓ 0.0 0 358 / 4

Index Scan using matriculaperiodo_pkey on matriculaperiodo matriculaperiodo_1 (cost=0.42..6.90 rows=1 width=8) (actual time=0.005..0.005 rows=0 loops=358)

  • Index Cond: (codigo = matriculaperiodoturmadisciplina_1.matriculaperiodo)
  • Filter: (((ano)::text = '2020'::text) AND ((semestre)::text = '1'::text))
  • Rows Removed by Filter: 1
68. 0.292 0.292 ↑ 1.0 1 167 / 4

Index Scan using index_historico_matriculaperiodoturmadisciplina on historico historico_1 (cost=0.43..8.17 rows=1 width=46) (actual time=0.007..0.007 rows=1 loops=167)

  • Index Cond: (matriculaperiodoturmadisciplina = matriculaperiodoturmadisciplina_1.codigo)
69. 4.115 5.845 ↓ 0.0 0 167

Index Scan using ch_atividadediscursivarespostaaluno_matriculaperiodoturmadiscip on atividadediscursivarespostaaluno atividadediscursivarespostaaluno_1 (cost=0.29..41.95 rows=3 width=8) (actual time=0.035..0.035 rows=0 loops=167)

  • Index Cond: (matriculaperiodoturmadisciplina = historico_1.matriculaperiodoturmadisciplina)
  • Filter: (((situacaorespostaatividadediscursiva)::text = 'AGUARDANDO_AVALIACAO_PROFESSOR'::text) OR (alternatives: SubPlan 37 or hashed SubPlan 38))
  • Rows Removed by Filter: 5
70.          

SubPlan (for Index Scan)

71. 1.730 1.730 ↓ 0.0 0 865

Index Scan using ch_atividadediscursivainteracao_atividadediscursivarespostaalun on atividadediscursivainteracao atividadediscursivainteracao_2 (cost=0.29..8.31 rows=1 width=0) (actual time=0.002..0.002 rows=0 loops=865)

  • Index Cond: (atividadediscursivarespostaaluno = atividadediscursivarespostaaluno_1.codigo)
  • Filter: ((NOT interacaojalida) AND ((interagidopor)::text = 'ALUNO'::text))
  • Rows Removed by Filter: 0
72. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on atividadediscursivainteracao atividadediscursivainteracao_3 (cost=197.77..1,354.20 rows=3,270 width=4) (never executed)

  • Recheck Cond: ((interagidopor)::text = 'ALUNO'::text)
  • Filter: (NOT interacaojalida)
73. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ch_atividadediscursivainteracao_interagidopor (cost=0.00..196.95 rows=7,555 width=0) (never executed)

  • Index Cond: ((interagidopor)::text = 'ALUNO'::text)
74. 0.000 0.000 ↓ 0.0 0

Index Scan using atividadediscursiva_pkey on atividadediscursiva atividadediscursiva_1 (cost=0.28..0.32 rows=1 width=22) (never executed)

  • Index Cond: (codigo = atividadediscursivarespostaaluno_1.atividadediscursiva)
75. 0.000 0.000 ↓ 0.0 0

Index Scan using matricula_pkey on matricula matricula_1 (cost=0.29..4.71 rows=1 width=13) (never executed)

  • Index Cond: ((matricula)::text = (matriculaperiodoturmadisciplina_1.matricula)::text)
76.          

SubPlan (for Nested Loop)

77. 0.000 0.000 ↓ 0.0 0

Limit (cost=17.71..21.74 rows=1 width=4) (never executed)

78. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico his_8 (cost=17.71..21.74 rows=1 width=4) (never executed)

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

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

80. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((matricula)::text = (historico_1.matricula)::text)
81. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (disciplina = historico_1.disciplina)
82. 0.000 0.000 ↓ 0.0 0

Limit (cost=17.71..21.74 rows=1 width=4) (never executed)

83. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico his_9 (cost=17.71..21.74 rows=1 width=4) (never executed)

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

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

85. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((matricula)::text = (historico_1.matricula)::text)
86. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (disciplina = historico_1.disciplina)
87. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=139.59..143.64 rows=1 width=0) (never executed)

88. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=121.88..121.89 rows=1 width=22) (never executed)

  • Group Key: (his_10.matricula)::text, (his_10.anohistorico)::text, (his_10.semestrehistorico)::text, his_10.disciplina, his_10.transferenciamatrizcurricularmatricula
89. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico his_10 (cost=117.85..121.87 rows=1 width=22) (never executed)

  • Recheck Cond: (((matricula)::text = (historico_1.matricula)::text) AND (matrizcurricular = matricula_1.gradecurricularatual))
  • Filter: ((historicocursandoporcorrespondenciaapostransferencia IS NULL) OR (NOT historicocursandoporcorrespondenciaapostransferencia))
90. 0.000 0.000 ↓ 0.0 0

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

91. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((matricula)::text = (historico_1.matricula)::text)
92. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ch_historico_gc (cost=0.00..112.77 rows=5,913 width=0) (never executed)

  • Index Cond: (matrizcurricular = matricula_1.gradecurricularatual)
93. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico hist_2 (cost=17.71..21.74 rows=1 width=22) (never executed)

  • Recheck Cond: (((matricula)::text = (historico_1.matricula)::text) AND (disciplina = his_10.disciplina))
  • Filter: (historicoporequivalencia AND (historico_1.mapaequivalenciadisciplina = mapaequivalenciadisciplina) AND (numeroagrupamentoequivalenciadisciplina = historico_1.numeroagrupamentoequivalenciadisciplina) AND ((his_10.anohistorico)::text = (anohistorico)::text) AND ((his_10.semestrehistorico)::text = (semestrehistorico)::text) AND (his_10.transferenciamatrizcurricularmatricula = transferenciamatrizcurricularmatricula))
94. 0.000 0.000 ↓ 0.0 0

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

95. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((matricula)::text = (historico_1.matricula)::text)
96. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (disciplina = his_10.disciplina)
97. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((disciplina = historico_1.disciplina) AND (matriculaperiodo = historico_1.matriculaperiodo) AND (matrizcurricular = matricula_1.gradecurricularatual))
  • Heap Fetches: 0
98. 0.000 0.000 ↓ 0.0 0

Index Scan using turma_pkey on turma turma_1 (cost=0.29..0.53 rows=1 width=12) (never executed)

  • Index Cond: (codigo = atividadediscursiva_1.turma)
99.          

SubPlan (for Nested Loop)

100. 0.000 0.000 ↓ 0.0 0

Seq Scan on disciplinaequivalente disciplinaequivalente_2 (cost=0.00..2.40 rows=1 width=4) (never executed)

  • Filter: (disciplina = atividadediscursiva_1.disciplina)
101. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on turmaagrupada turmaagrupada_12 (cost=4.30..11.65 rows=1 width=0) (never executed)

  • Recheck Cond: (turmaorigem = turma_1.codigo)
  • Filter: (turma = matriculaperiodoturmadisciplina_1.turma)
102. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_turmaagrupada_turmaorigem (cost=0.00..4.30 rows=3 width=0) (never executed)

  • Index Cond: (turmaorigem = turma_1.codigo)
103. 0.000 0.000 ↓ 0.0 0

Seq Scan on turmaagrupada turmaagrupada_13 (cost=0.00..24.33 rows=1,333 width=8) (never executed)

104. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on turmaagrupada turmaagrupada_14 (cost=4.30..11.65 rows=1 width=0) (never executed)

  • Recheck Cond: (turmaorigem = turma_1.codigo)
  • Filter: (turma = matriculaperiodoturmadisciplina_1.turmapratica)
105. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_turmaagrupada_turmaorigem (cost=0.00..4.30 rows=3 width=0) (never executed)

  • Index Cond: (turmaorigem = turma_1.codigo)
106. 0.000 0.000 ↓ 0.0 0

Seq Scan on turmaagrupada turmaagrupada_15 (cost=0.00..24.33 rows=1,333 width=8) (never executed)

107. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on turmaagrupada turmaagrupada_16 (cost=4.30..11.65 rows=1 width=0) (never executed)

  • Recheck Cond: (turmaorigem = turma_1.codigo)
  • Filter: (turma = matriculaperiodoturmadisciplina_1.turmateorica)
108. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_turmaagrupada_turmaorigem (cost=0.00..4.30 rows=3 width=0) (never executed)

  • Index Cond: (turmaorigem = turma_1.codigo)
109. 0.000 0.000 ↓ 0.0 0

Seq Scan on turmaagrupada turmaagrupada_17 (cost=0.00..24.33 rows=1,333 width=8) (never executed)

110. 0.000 0.000 ↓ 0.0 0

Index Only Scan using disciplina_pkey on disciplina disciplina_1 (cost=0.28..0.31 rows=1 width=4) (never executed)

  • Index Cond: (codigo = atividadediscursiva_1.disciplina)
  • Heap Fetches: 0
111.          

SubPlan (for GroupAggregate)

112. 0.000 0.000 ↓ 0.0 0

Aggregate (cost=546,791.25..546,791.26 rows=1 width=8) (never executed)

113. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=56.60..546,791.24 rows=1 width=9) (never executed)

  • Join Filter: (((matricula_2.gradecurricularatual = historico_2.matrizcurricular) AND ((historico_2.historicocursandoporcorrespondenciaapostransferencia IS NULL) OR (NOT historico_2.historicocursandoporcorrespondenciaapostransferencia)) AND ((historico_2.transferenciamatrizcurricularmatricula IS NULL) OR ((historico_2.transferenciamatrizcurricularmatricula IS NOT NULL) AND (NOT (SubPlan 8))))) OR ((matricula_2.gradecurricularatual <> historico_2.matrizcurricular) AND historico_2.historicocursandoporcorrespondenciaapostransferencia AND (historico_2.transferenciamatrizcurricularmatricula IS NOT NULL) AND (historico_2.disciplina = (SubPlan 9)) AND ((NOT historico_2.historicoporequivalencia) OR (historico_2.historicoporequivalencia IS NULL))) OR ((matricula_2.gradecurricularatual <> historico_2.matrizcurricular) AND historico_2.historicoequivalente AND (SubPlan 10)) OR ((historico_2.matrizcurricular = matriculaperiodo_2.gradecurricular) AND (matricula_2.gradecurricularatual <> historico_2.matrizcurricular) AND historico_2.historicodisciplinafazpartecomposicao AND (NOT (SubPlan 11))))
114. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=56.17..546,595.43 rows=1 width=21) (never executed)

115. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=55.88..546,595.09 rows=1 width=25) (never executed)

116. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=55.59..546,592.58 rows=1 width=17) (never executed)

  • Filter: ((atividadediscursivarespostaaluno_2.codigo IS NULL) OR ((atividadediscursivarespostaaluno_2.situacaorespostaatividadediscursiva)::text = 'AGUARDANDO_RESPOSTA'::text))
117. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=55.29..546,565.34 rows=4 width=17) (never executed)

118. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on matriculaperiodo matriculaperiodo_2 (cost=52.47..3,132.64 rows=2,346 width=17) (never executed)

  • Recheck Cond: (((ano)::text = '2020'::text) AND ((semestre)::text = '1'::text))
119. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ch_matriculaperiodo_ano_semestre (cost=0.00..51.88 rows=2,346 width=0) (never executed)

  • Index Cond: (((ano)::text = '2020'::text) AND ((semestre)::text = '1'::text))
120. 0.000 0.000 ↓ 0.0 0

Index Scan using ch_matriculaperiodoturmadisciplina_matriculaperiodo on matriculaperiodoturmadisciplina matriculaperiodoturmadisciplina_2 (cost=2.83..231.63 rows=1 width=8) (never executed)

  • Index Cond: (matriculaperiodo = matriculaperiodo_2.codigo)
  • Filter: (((disciplina = atividadediscursiva.disciplina) OR (turma.turmaagrupada AND (hashed SubPlan 1))) AND ((((modalidadedisciplina)::text = 'ON_LINE'::text) AND (professor = 83102) AND ((atividadediscursiva.publicoalvo)::text = 'TURMA'::text) AND (turma = atividadediscursiva.turma)) OR (((modalidadedisciplina)::text <> 'ON_LINE'::text) AND ((atividadediscursiva.publicoalvo)::text = 'TURMA'::text) AND (((turmapratica IS NOT NULL) AND turma.subturma AND ((turma.tiposubturma)::text = 'PRATICA'::text) AND (turma.codigo = turmapratica)) OR ((turmateorica IS NOT NULL) AND turma.subturma AND ((turma.tiposubturma)::text = 'TEORICA'::text) AND (turma.codigo = turmateorica)) OR (turma.turmaagrupada AND (alternatives: SubPlan 2 or hashed SubPlan 3)) OR ((turmapratica IS NOT NULL) AND turma.turmaagrupada AND (alternatives: SubPlan 4 or hashed SubPlan 5)) OR ((turmateorica IS NOT NULL) AND turma.turmaagrupada AND (alternatives: SubPlan 6 or hashed SubPlan 7)) OR ((NOT turma.turmaagrupada) AND (NOT turma.subturma) AND (turma = turma.codigo)))) OR ((codigo = atividadediscursiva.matriculaperiodoturmadisciplina) AND ((atividadediscursiva.publicoalvo)::text = 'ALUNO'::text))))
121.          

SubPlan (for Index Scan)

122. 0.000 0.000 ↓ 0.0 0

Seq Scan on disciplinaequivalente (cost=0.00..2.40 rows=1 width=4) (never executed)

  • Filter: (disciplina = atividadediscursiva.disciplina)
123. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on turmaagrupada (cost=4.30..11.65 rows=1 width=0) (never executed)

  • Recheck Cond: (turmaorigem = turma.codigo)
  • Filter: (turma = matriculaperiodoturmadisciplina_2.turma)
124. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_turmaagrupada_turmaorigem (cost=0.00..4.30 rows=3 width=0) (never executed)

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

Bitmap Heap Scan on turmaagrupada turmaagrupada_1 (cost=4.30..11.64 rows=3 width=4) (never executed)

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

Bitmap Index Scan on idx_turmaagrupada_turmaorigem (cost=0.00..4.30 rows=3 width=0) (never executed)

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

Bitmap Heap Scan on turmaagrupada turmaagrupada_2 (cost=4.30..11.65 rows=1 width=0) (never executed)

  • Recheck Cond: (turmaorigem = turma.codigo)
  • Filter: (turma = matriculaperiodoturmadisciplina_2.turmapratica)
128. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_turmaagrupada_turmaorigem (cost=0.00..4.30 rows=3 width=0) (never executed)

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

Bitmap Heap Scan on turmaagrupada turmaagrupada_3 (cost=4.30..11.64 rows=3 width=4) (never executed)

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

Bitmap Index Scan on idx_turmaagrupada_turmaorigem (cost=0.00..4.30 rows=3 width=0) (never executed)

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

Bitmap Heap Scan on turmaagrupada turmaagrupada_4 (cost=4.30..11.65 rows=1 width=0) (never executed)

  • Recheck Cond: (turmaorigem = turma.codigo)
  • Filter: (turma = matriculaperiodoturmadisciplina_2.turmateorica)
132. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_turmaagrupada_turmaorigem (cost=0.00..4.30 rows=3 width=0) (never executed)

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

Bitmap Heap Scan on turmaagrupada turmaagrupada_5 (cost=4.30..11.64 rows=3 width=4) (never executed)

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

Bitmap Index Scan on idx_turmaagrupada_turmaorigem (cost=0.00..4.30 rows=3 width=0) (never executed)

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

Index Scan using unique_atividadediscursiva_matriculaperiodoturmadisciplina on atividadediscursivarespostaaluno atividadediscursivarespostaaluno_2 (cost=0.29..6.80 rows=1 width=24) (never executed)

  • Index Cond: ((atividadediscursiva = atividadediscursiva.codigo) AND (matriculaperiodoturmadisciplina = matriculaperiodoturmadisciplina_2.codigo))
136. 0.000 0.000 ↓ 0.0 0

Index Scan using matricula_pkey on matricula matricula_2 (cost=0.29..2.51 rows=1 width=17) (never executed)

  • Index Cond: ((matricula)::text = (matriculaperiodo_2.matricula)::text)
137. 0.000 0.000 ↓ 0.0 0

Index Only Scan using pessoa_pkey on pessoa (cost=0.29..0.34 rows=1 width=4) (never executed)

  • Index Cond: (codigo = matricula_2.aluno)
  • Heap Fetches: 0
138. 0.000 0.000 ↓ 0.0 0

Index Scan using index_historico_matriculaperiodoturmadisciplina on historico historico_2 (cost=0.43..8.25 rows=1 width=46) (never executed)

  • Index Cond: (matriculaperiodoturmadisciplina = matriculaperiodoturmadisciplina_2.codigo)
139.          

SubPlan (for Nested Loop)

140. 0.000 0.000 ↓ 0.0 0

Limit (cost=17.71..21.74 rows=1 width=4) (never executed)

141. 0.000 0.000 ↓ 0.0 0

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

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

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

143. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((matricula)::text = (historico_2.matricula)::text)
144. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (disciplina = historico_2.disciplina)
145. 0.000 0.000 ↓ 0.0 0

Limit (cost=17.71..21.74 rows=1 width=4) (never executed)

146. 0.000 0.000 ↓ 0.0 0

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

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

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

148. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((matricula)::text = (historico_2.matricula)::text)
149. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (disciplina = historico_2.disciplina)
150. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=139.59..143.64 rows=1 width=0) (never executed)

151. 0.000 0.000 ↓ 0.0 0

HashAggregate (cost=121.88..121.89 rows=1 width=22) (never executed)

  • Group Key: (his_2.matricula)::text, (his_2.anohistorico)::text, (his_2.semestrehistorico)::text, his_2.disciplina, his_2.transferenciamatrizcurricularmatricula
152. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico his_2 (cost=117.85..121.87 rows=1 width=22) (never executed)

  • Recheck Cond: (((matricula)::text = (historico_2.matricula)::text) AND (matrizcurricular = matricula_2.gradecurricularatual))
  • Filter: ((historicocursandoporcorrespondenciaapostransferencia IS NULL) OR (NOT historicocursandoporcorrespondenciaapostransferencia))
153. 0.000 0.000 ↓ 0.0 0

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

154. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((matricula)::text = (historico_2.matricula)::text)
155. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ch_historico_gc (cost=0.00..112.77 rows=5,913 width=0) (never executed)

  • Index Cond: (matrizcurricular = matricula_2.gradecurricularatual)
156. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on historico hist (cost=17.71..21.74 rows=1 width=22) (never executed)

  • Recheck Cond: (((matricula)::text = (historico_2.matricula)::text) AND (disciplina = his_2.disciplina))
  • Filter: (historicoporequivalencia AND (historico_2.mapaequivalenciadisciplina = mapaequivalenciadisciplina) AND (numeroagrupamentoequivalenciadisciplina = historico_2.numeroagrupamentoequivalenciadisciplina) AND ((his_2.anohistorico)::text = (anohistorico)::text) AND ((his_2.semestrehistorico)::text = (semestrehistorico)::text) AND (his_2.transferenciamatrizcurricularmatricula = transferenciamatrizcurricularmatricula))
157. 0.000 0.000 ↓ 0.0 0

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

158. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((matricula)::text = (historico_2.matricula)::text)
159. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: (disciplina = his_2.disciplina)
160. 0.000 0.000 ↓ 0.0 0

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

  • Index Cond: ((disciplina = historico_2.disciplina) AND (matriculaperiodo = historico_2.matriculaperiodo) AND (matrizcurricular = matricula_2.gradecurricularatual))
  • Heap Fetches: 0
161. 0.000 0.000 ↓ 0.0 0

Index Scan using ch_atividadediscursivainteracao_atividadediscursivarespostaalun on atividadediscursivainteracao (cost=0.29..8.31 rows=1 width=0) (never executed)

  • Index Cond: (atividadediscursivarespostaaluno = atividadediscursivarespostaaluno.codigo)
  • Filter: ((NOT interacaojalida) AND ((interagidopor)::text = 'ALUNO'::text))
162. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on atividadediscursivainteracao atividadediscursivainteracao_1 (cost=197.77..1,354.20 rows=3,270 width=4) (never executed)

  • Recheck Cond: ((interagidopor)::text = 'ALUNO'::text)
  • Filter: (NOT interacaojalida)
163. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on ch_atividadediscursivainteracao_interagidopor (cost=0.00..196.95 rows=7,555 width=0) (never executed)

  • Index Cond: ((interagidopor)::text = 'ALUNO'::text)
Execution time : 18,044.792 ms