explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xlsW

Settings
# exclusive inclusive rows x rows loops node
1. 0.032 22,153.963 ↑ 25,000.0 18 1

Unique (cost=117,991,726.27..118,016,476.27 rows=450,000 width=663) (actual time=22,153.930..22,153.963 rows=18 loops=1)

  • Functions: 336
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 128.739 ms, Inlining 44.381 ms, Optimization 12545.152 ms, Emission 9501.167 ms, Total 22219.439 ms
2. 0.130 22,153.931 ↑ 25,000.0 18 1

Sort (cost=117,991,726.27..117,992,851.27 rows=450,000 width=663) (actual time=22,153.929..22,153.931 rows=18 loops=1)

  • Sort Key: (uuid_generate_v4()), (CASE WHEN ((formacaoacademica.escolaridade)::text = 'MS'::text) THEN 'Mestre'::text WHEN ((formacaoacademica.escolaridade)::text = 'DR'::text) THEN 'Doutor'::text WHEN ((formacaoacademica.escolaridade)::text = 'EP'::text) THEN 'Especialista'::text WHEN (((formacaoacademica.escolaridade)::text = 'GR'::text) AND ((pessoa.sexo)::text = 'M'::text)) THEN 'Graduado'::text WHEN (((formacaoacademica.escolaridade)::text = 'GR'::text) AND ((pessoa.sexo)::text = 'F'::text)) THEN 'Graduada'::text WHEN (((formacaoacademica.escolaridade)::text = 'GR'::text) AND ((COALESCE(pessoa.sexo, ''::character varying))::text = ''::text)) THEN 'Graduado(a)'::text ELSE NULL::text END), localaula_1.local, salalocalaula.sala, periodoauladisciplinaaluno_1.datainicio, periodoauladisciplinaaluno_1.datatermino, periodoauladisciplinaaluno_1.professor_nome, historico.codigo, historico.mediafinal, turma.identificadorturma, turmaestudo.identificadorturma, (CASE WHEN (((CASE WHEN (((matriculaperiodo.situacaomatriculaperiodo)::text = 'PR'::text) AND (historico.disciplinasaproveitadas IS NULL)) THEN 'PR'::character varying ELSE historico.situacao END))::text = 'AA'::text) THEN 'Aprovado por Aproveitamento'::text WHEN (((CASE WHEN (((matriculaperiodo.situacaomatriculaperiodo)::text = 'PR'::text) AND (historico.disciplinasaproveitadas IS NULL)) THEN 'PR'::character varying ELSE historico.situacao END))::text = 'AP'::text) THEN 'Aprovado'::text WHEN (((CASE WHEN (((matriculaperiodo.situacaomatriculaperiodo)::text = 'PR'::text) AND (historico.disciplinasaproveitadas IS NULL)) THEN 'PR'::character varying ELSE historico.situacao END))::text = 'RE'::text) THEN 'Reprovado'::text WHEN (((CASE WHEN (((matriculaperiodo.situacaomatriculaperiodo)::text = 'PR'::text) AND (historico.disciplinasaproveitadas IS NULL)) THEN 'PR'::character varying ELSE historico.situacao END))::text = 'CS'::text) THEN 'Cursando'::text WHEN (((CASE WHEN (((matriculaperiodo.situacaomatriculaperiodo)::text = 'PR'::text) AND (historico.disciplinasaproveitadas IS NULL)) THEN 'PR'::character varying ELSE historico.situacao END))::text = 'CS'::text) THEN 'Cursando por Equivalência'::text WHEN (((CASE WHEN (((matriculaperiodo.situacaomatriculaperiodo)::text = 'PR'::text) AND (historico.disciplinasaproveitadas IS NULL)) THEN 'PR'::character varying ELSE historico.situacao END))::text = 'CO'::text) THEN 'Cursando por Correspondência'::text WHEN (((CASE WHEN (((matriculaperiodo.situacaomatriculaperiodo)::text = 'PR'::text) AND (historico.disciplinasaproveitadas IS NULL)) THEN 'PR'::character varying ELSE historico.situacao END))::text = 'TR'::text) THEN 'Trancado'::text WHEN (((CASE WHEN (((matriculaperiodo.situacaomatriculaperiodo)::text = 'PR'::text) AND (historico.disciplinasaproveitadas IS NULL)) THEN 'PR'::character varying ELSE historico.situacao END))::text = 'CA'::text) THEN 'Cancelado'::text WHEN (((CASE WHEN (((matriculaperiodo.situacaomatriculaperiodo)::text = 'PR'::text) AND (historico.disciplinasaproveitadas IS NULL)) THEN 'PR'::character varying ELSE historico.situacao END))::text = 'TF'::text) THEN 'Transferido'::text WHEN (((CASE WHEN (((matriculaperiodo.situacaomatriculaperiodo)::text = 'PR'::text) AND (historico.disciplinasaproveitadas IS NULL)) THEN 'PR'::character varying ELSE historico.situacao END))::text = 'RF'::text) THEN 'Reprovado Falta'::text ELSE NULL::text END), historico.freguencia, historico.anohistorico, historico.semestrehistorico, disciplina.codigo, (CASE WHEN (disciplinaeixotematico.codigo IS NULL) THEN disciplina.nome ELSE disciplinaeixotematico.nome END), (CASE WHEN ((CASE WHEN (disciplinasaproveitadas.codigo IS NOT NULL) THEN disciplinasaproveitadas.cargahorariacursada ELSE historico.cargahorariacursada END) = 0) THEN CASE WHEN (((CASE WHEN (((matriculaperiodo.situacaomatriculaperiodo)::text = 'PR'::text) AND (historico.disciplinasaproveitadas IS NULL)) THEN 'PR'::character varying ELSE historico.situacao END))::text = ANY ('{CC,CH}'::text[])) THEN ((CASE WHEN (transferenciaentradadisciplinasaproveitadas.codigo IS NOT NULL) THEN (transferenciaentradadisciplinasaproveitadas.cargahoraria)::integer ELSE CASE WHEN (disciplinasaproveitadas.codigo IS NOT NULL) THEN disciplinasaproveitadas.cargahoraria ELSE CASE WHEN ((historico.cargahorariadisciplina IS NOT NULL) AND (historico.cargahorariadisciplina > 0)) THEN historico.cargahorariadisciplina ELSE CASE WHEN (gradedisciplina.codigo IS NOT NULL) THEN gradedisciplina.cargahoraria ELSE gradecurriculargrupooptativadisciplina.cargahoraria END END END END))::numeric ELSE CASE WHEN ((((SubPlan 4)) IS NOT NULL) AND (((SubPlan 4)) > '0'::numeric)) THEN ((SubPlan 4)) ELSE ((((((CASE WHEN (transferenciaentradadisciplinasaproveitadas.codigo IS NOT NULL) THEN (transferenciaentradadisciplinasaproveitadas.cargahoraria)::integer ELSE CASE WHEN (disciplinasaproveitadas.codigo IS NOT NULL) THEN disciplinasaproveitadas.cargahoraria ELSE CASE WHEN ((historico.cargahorariadisciplina IS NOT NULL) AND (historico.cargahorariadisciplina > 0)) THEN historico.cargahorariadisciplina ELSE CASE WHEN (gradedisciplina.codigo IS NOT NULL) THEN gradedisciplina.cargahoraria ELSE gradecurriculargrupooptativadisciplina.cargahoraria END END END END))::double precision * historico.freguencia) / '100'::double precision))::integer)::numeric END END ELSE ((CASE WHEN (disciplinasaproveitadas.codigo IS NOT NULL) THEN disciplinasaproveitadas.cargahorariacursada ELSE historico.cargahorariacursada END))::numeric END), mptd.codigo, matriculaperiodo.codigo, historico.totalfalta
  • Sort Method: quicksort Memory: 29kB
3. 0.553 22,153.801 ↑ 25,000.0 18 1

Nested Loop Left Join (cost=101,747,545.23..117,817,196.75 rows=450,000 width=663) (actual time=22,118.198..22,153.801 rows=18 loops=1)

4. 0.121 22,152.618 ↑ 25,000.0 18 1

Nested Loop Left Join (cost=101,747,529.49..110,693,943.66 rows=450,000 width=632) (actual time=22,118.093..22,152.618 rows=18 loops=1)

5. 0.073 22,116.209 ↑ 25.0 18 1

Unique (cost=101,747,528.52..101,747,601.65 rows=450 width=1,761) (actual time=22,116.127..22,116.209 rows=18 loops=1)

6. 0.189 22,116.136 ↑ 25.0 18 1

Sort (cost=101,747,528.52..101,747,529.65 rows=450 width=1,761) (actual time=22,116.127..22,116.136 rows=18 loops=1)

  • Sort Key: periodoletivo.periodoletivo, (CASE WHEN (disciplinaeixotematico.codigo IS NULL) THEN disciplina.nome ELSE disciplinaeixotematico.nome END), historico.anohistorico, historico.semestrehistorico, historico.codigo, turma.identificadorturma, historico.tipohistorico, historico.totalfalta, historico.mediafinal, (CASE WHEN (((matriculaperiodo.situacaomatriculaperiodo)::text = 'PR'::text) AND (historico.disciplinasaproveitadas IS NULL)) THEN 'PR'::character varying ELSE historico.situacao END), historico.freguencia, historico.frequenciateorica, historico.frequenciapratica, historico.utilizanotafinalconceito, historico.notafinalconceito, historico.historicodisciplinaforagrade, historico.historicodisciplinaatividadecomplementar, historico.observacao, historico.numeroagrupamentoequivalenciadisciplina, (CASE WHEN ((transferenciaentrada.codigo IS NOT NULL) AND (transferenciaentrada.instituicaoorigem IS NOT NULL) AND ((transferenciaentrada.instituicaoorigem)::text <> ''::text)) THEN transferenciaentrada.instituicaoorigem ELSE CASE WHEN ((disciplinasaproveitadas.codigo IS NOT NULL) AND (disciplinasaproveitadas.instituicao IS NOT NULL) AND ((disciplinasaproveitadas.instituicao)::text <> ''::text)) THEN disciplinasaproveitadas.instituicao ELSE CASE WHEN (((historico.instituicao)::text = ''::text) OR (historico.instituicao IS NULL)) THEN unidadeensino.nomeexpedicaodiploma ELSE historico.instituicao END END END), (CASE WHEN ((transferenciaentrada.codigo IS NOT NULL) AND (transferenciaentrada.instituicaoorigem IS NOT NULL) AND ((transferenciaentrada.instituicaoorigem)::text <> ''::text)) THEN cidadetrans.nome ELSE CASE WHEN ((disciplinasaproveitadas.codigo IS NOT NULL) AND (disciplinasaproveitadas.instituicao IS NOT NULL) AND ((disciplinasaproveitadas.instituicao)::text <> ''::text)) THEN cidadeap.nome ELSE CASE WHEN (((historico.situacao)::text = ANY ('{AA,CC,IS}'::text[])) AND (historico.cidade IS NOT NULL)) THEN cidadehistorico.nome ELSE cidade.nome END END END), (CASE WHEN ((transferenciaentrada.codigo IS NOT NULL) AND (transferenciaentrada.instituicaoorigem IS NOT NULL) AND ((transferenciaentrada.instituicaoorigem)::text <> ''::text)) THEN cidadetrans.codigo ELSE CASE WHEN ((disciplinasaproveitadas.codigo IS NOT NULL) AND (disciplinasaproveitadas.instituicao IS NOT NULL) AND ((disciplinasaproveitadas.instituicao)::text <> ''::text)) THEN cidadeap.codigo ELSE CASE WHEN (((historico.situacao)::text = ANY ('{AA,CC,IS}'::text[])) AND (historico.cidade IS NOT NULL)) THEN cidadehistorico.codigo ELSE cidade.codigo END END END), (CASE WHEN ((transferenciaentrada.codigo IS NOT NULL) AND (transferenciaentrada.instituicaoorigem IS NOT NULL) AND ((transferenciaentrada.instituicaoorigem)::text <> ''::text)) THEN estadotrans.sigla ELSE CASE WHEN ((disciplinasaproveitadas.codigo IS NOT NULL) AND (disciplinasaproveitadas.instituicao IS NOT NULL) AND ((disciplinasaproveitadas.instituicao)::text <> ''::text)) THEN estadoap.sigla ELSE CASE WHEN (((historico.situacao)::text = ANY ('{AA,CC,IS}'::text[])) AND (historico.cidade IS NOT NULL)) THEN estadohistorico.sigla ELSE estado.sigla END END END), historico.historicodisciplinacomposta, historico.historicodisciplinafazpartecomposicao, mfc.codigo, mfc.conceitonota, mfc.abreviaturaconceitonota, mfc.situacao, mfc.tiponotaconceito, mfc.faixanota1, mfc.faixanota2, mfc.configuracaoacademico, matriculaperiodo.ano, matriculaperiodo.semestre, disciplina.codigo, (CASE WHEN ((historico.creditodisciplina IS NOT NULL) AND (historico.creditodisciplina > 0)) THEN historico.creditodisciplina ELSE CASE WHEN (gradedisciplina.codigo IS NOT NULL) THEN gradedisciplina.nrcreditos ELSE gradecurriculargrupooptativadisciplina.nrcreditos END END), gradedisciplina.nomechancela, gradedisciplina.tipodisciplina, (CASE WHEN (gradedisciplina.codigo IS NOT NULL) THEN gradedisciplina.diversificada ELSE gradecurriculargrupooptativadisciplina.diversificada END), gradedisciplina.codigo, gradedisciplina.ordem, (CASE WHEN (transferenciaentradadisciplinasaproveitadas.codigo IS NOT NULL) THEN (transferenciaentradadisciplinasaproveitadas.cargahoraria)::integer ELSE CASE WHEN (disciplinasaproveitadas.codigo IS NOT NULL) THEN disciplinasaproveitadas.cargahoraria ELSE CASE WHEN ((historico.cargahorariadisciplina IS NOT NULL) AND (historico.cargahorariadisciplina > 0)) THEN historico.cargahorariadisciplina ELSE CASE WHEN (gradedisciplina.codigo IS NOT NULL) THEN gradedisciplina.cargahoraria ELSE gradecurriculargrupooptativadisciplina.cargahoraria END END END END), (CASE WHEN (disciplinasaproveitadas.codigo IS NOT NULL) THEN disciplinasaproveitadas.cargahorariacursada ELSE historico.cargahorariacursada END), ((SubPlan 4)), historico.apresentaraprovadohistorico, (CASE WHEN ((cursomatricula.niveleducacional)::text = ANY ('{ME,IN,BA}'::text[])) THEN true ELSE configuracaoacademico.apresentarperiodoletivomatriculaperiodoatualhistorico END), configuracaoacademico.apresentarsiglaconcessaocredito, periodoletivo.codigo, plmp.codigo, plmp.periodoletivo, unidadeensino.codigo, mptd.disciplinaequivale, mptd.disciplina, mptd.codigo, matriculaperiodo.codigo, matriculaperiodo.situacaomatriculaperiodo, configuracaoacademico.intervalonotasdiferente, ((SubPlan 5)), configuracaoacademico.codigo, configuracaoacademico.ocultarsituacaodisciplinamaecasoreprovadodisciplinafilha, configuracaoacademico.quantidadecasasdecimaispermitiraposvirgula, configuracaoacademico.apresentartotalaularegistradacomocargahorariacursadanohistorico, turmaestudo.identificadorturma
  • Sort Method: quicksort Memory: 34kB
7. 0.209 22,115.947 ↑ 25.0 18 1

Group (cost=1,099.78..101,747,508.69 rows=450 width=1,761) (actual time=22,115.077..22,115.947 rows=18 loops=1)

  • Group Key: cursomatricula.niveleducacional, matriculaperiodo.codigo, historico.codigo, mfc.codigo, plmp.codigo, disciplinaeixotematico.codigo, disciplina.codigo, periodoletivo.codigo, unidadeensino.codigo, estado.sigla, disciplinasaproveitadas.codigo, estadoap.sigla, estadotrans.sigla, transferenciaentrada.codigo, transferenciaentradadisciplinasaproveitadas.codigo, mptd.codigo, cidadetrans.codigo, cidadeap.codigo, cidade.codigo, cidadehistorico.codigo, estadohistorico.sigla, gradedisciplina.codigo, gradecurriculargrupooptativadisciplina.cargahoraria, gradecurriculargrupooptativadisciplina.diversificada, gradecurriculargrupooptativadisciplina.nrcreditos, matricula.curso, matricula.turno, matricula.unidadeensino, turno.considerarhoraaulasessentaminutosgeracaodiario, configuracaoacademico.codigo, turma.identificadorturma, turmaestudo.identificadorturma
8. 0.154 22,114.820 ↑ 25.0 18 1

Sort (cost=1,099.78..1,100.90 rows=450 width=935) (actual time=22,114.816..22,114.820 rows=18 loops=1)

  • Sort Key: cursomatricula.niveleducacional, matriculaperiodo.codigo, historico.codigo, mfc.codigo, plmp.codigo, disciplinaeixotematico.codigo, disciplina.codigo, periodoletivo.codigo, unidadeensino.codigo, estado.sigla, disciplinasaproveitadas.codigo, estadoap.sigla, estadotrans.sigla, transferenciaentrada.codigo, transferenciaentradadisciplinasaproveitadas.codigo, mptd.codigo, cidadetrans.codigo, cidadeap.codigo, cidade.codigo, cidadehistorico.codigo, estadohistorico.sigla, gradedisciplina.codigo, gradecurriculargrupooptativadisciplina.cargahoraria, gradecurriculargrupooptativadisciplina.diversificada, gradecurriculargrupooptativadisciplina.nrcreditos, matricula.curso, matricula.turno, turno.considerarhoraaulasessentaminutosgeracaodiario, configuracaoacademico.codigo, turma.identificadorturma, turmaestudo.identificadorturma
  • Sort Method: quicksort Memory: 34kB
9. 0.031 22,114.666 ↑ 25.0 18 1

Hash Left Join (cost=757.67..1,079.95 rows=450 width=935) (actual time=22,107.172..22,114.666 rows=18 loops=1)

  • Hash Cond: (cidadehistorico.estado = estadohistorico.codigo)
10. 0.061 22,114.608 ↑ 25.0 18 1

Hash Left Join (cost=755.74..1,076.72 rows=450 width=937) (actual time=22,107.130..22,114.608 rows=18 loops=1)

  • Hash Cond: (historico.cidade = cidadehistorico.codigo)
11. 0.031 22,110.370 ↑ 25.0 18 1

Hash Left Join (cost=412.55..732.34 rows=450 width=910) (actual time=22,102.910..22,110.370 rows=18 loops=1)

  • Hash Cond: (cidadetrans.estado = estadotrans.codigo)
12. 0.053 22,110.311 ↑ 25.0 18 1

Hash Left Join (cost=410.62..729.11 rows=450 width=912) (actual time=22,102.868..22,110.311 rows=18 loops=1)

  • Hash Cond: (transferenciaentrada.cidade = cidadetrans.codigo)
13. 0.029 22,105.870 ↑ 25.0 18 1

Hash Left Join (cost=67.43..384.74 rows=450 width=889) (actual time=22,098.444..22,105.870 rows=18 loops=1)

  • Hash Cond: (cidadeap.estado = estadoap.codigo)
14. 0.054 22,105.815 ↑ 25.0 18 1

Nested Loop Left Join (cost=65.50..381.51 rows=450 width=891) (actual time=22,098.406..22,105.815 rows=18 loops=1)

15. 0.033 22,105.743 ↑ 25.0 18 1

Hash Left Join (cost=65.22..217.61 rows=450 width=868) (actual time=22,098.383..22,105.743 rows=18 loops=1)

  • Hash Cond: (transferenciaentradadisciplinasaproveitadas.transferenciaentrada = transferenciaentrada.codigo)
16. 0.044 22,105.483 ↑ 25.0 18 1

Hash Left Join (cost=45.94..197.14 rows=450 width=806) (actual time=22,098.144..22,105.483 rows=18 loops=1)

  • Hash Cond: (historico.transferenciaentradadisciplinasaproveitadas = transferenciaentradadisciplinasaproveitadas.codigo)
17. 1.567 22,105.434 ↑ 25.0 18 1

Nested Loop Left Join (cost=16.14..166.15 rows=450 width=758) (actual time=22,098.118..22,105.434 rows=18 loops=1)

  • Join Filter: CASE WHEN (historico.periodoletivocursada IS NOT NULL) THEN (plmp.codigo = historico.periodoletivocursada) ELSE (plmp.codigo = matriculaperiodo.periodoletivomatricula) END
  • Rows Removed by Join Filter: 16164
18. 0.043 22,102.175 ↓ 18.0 18 1

Nested Loop Left Join (cost=16.14..131.68 rows=1 width=758) (actual time=22,097.938..22,102.175 rows=18 loops=1)

19. 0.034 22,102.132 ↓ 18.0 18 1

Nested Loop Left Join (cost=15.85..124.47 rows=1 width=723) (actual time=22,097.925..22,102.132 rows=18 loops=1)

20. 0.290 22,102.080 ↓ 18.0 18 1

Nested Loop Left Join (cost=15.57..124.08 rows=1 width=678) (actual time=22,097.916..22,102.080 rows=18 loops=1)

21. 0.030 22,101.736 ↓ 18.0 18 1

Nested Loop Left Join (cost=15.44..122.99 rows=1 width=669) (actual time=22,097.878..22,101.736 rows=18 loops=1)

  • Filter: ((gradecurriculargrupooptativadisciplina.codigo IS NOT NULL) OR (gradedisciplina.codigo IS NOT NULL) OR historico.historicodisciplinaforagrade)
22. 0.086 22,101.688 ↓ 18.0 18 1

Nested Loop Left Join (cost=15.30..122.28 rows=1 width=664) (actual time=22,097.867..22,101.688 rows=18 loops=1)

23. 0.051 22,101.404 ↓ 18.0 18 1

Nested Loop Left Join (cost=13.38..116.32 rows=1 width=664) (actual time=22,097.830..22,101.404 rows=18 loops=1)

24. 0.032 22,101.263 ↓ 18.0 18 1

Nested Loop (cost=13.09..109.10 rows=1 width=635) (actual time=22,097.811..22,101.263 rows=18 loops=1)

25. 0.043 22,101.159 ↓ 18.0 18 1

Nested Loop Left Join (cost=12.82..107.90 rows=1 width=643) (actual time=22,097.792..22,101.159 rows=18 loops=1)

26. 0.036 22,101.062 ↓ 18.0 18 1

Nested Loop Left Join (cost=12.68..107.74 rows=1 width=646) (actual time=22,097.775..22,101.062 rows=18 loops=1)

27. 0.063 22,100.972 ↓ 18.0 18 1

Nested Loop Left Join (cost=12.54..107.58 rows=1 width=648) (actual time=22,097.762..22,100.972 rows=18 loops=1)

28. 0.299 22,100.819 ↓ 18.0 18 1

Nested Loop (cost=12.25..102.71 rows=1 width=625) (actual time=22,097.741..22,100.819 rows=18 loops=1)

  • Join Filter: (matricula.unidadeensino = unidadeensino.codigo)
  • Rows Removed by Join Filter: 684
29. 0.090 22,100.376 ↓ 18.0 18 1

Nested Loop Left Join (cost=12.25..94.96 rows=1 width=599) (actual time=22,097.696..22,100.376 rows=18 loops=1)

  • Filter: CASE WHEN ((curso.periodicidade)::text = 'IN'::text) THEN (historico.codigo = (SubPlan 6)) ELSE true END
30. 0.036 22,098.432 ↓ 18.0 18 1

Nested Loop (cost=11.70..58.09 rows=1 width=604) (actual time=22,097.557..22,098.432 rows=18 loops=1)

31. 0.025 22,098.324 ↓ 18.0 18 1

Nested Loop Left Join (cost=11.43..49.77 rows=1 width=601) (actual time=22,097.540..22,098.324 rows=18 loops=1)

32. 0.046 22,098.281 ↓ 18.0 18 1

Nested Loop (cost=11.28..45.59 rows=1 width=245) (actual time=22,097.527..22,098.281 rows=18 loops=1)

33. 0.037 22,098.163 ↓ 18.0 18 1

Nested Loop Left Join (cost=11.00..39.11 rows=1 width=196) (actual time=22,097.506..22,098.163 rows=18 loops=1)

34. 0.049 22,098.054 ↓ 18.0 18 1

Nested Loop Left Join (cost=10.72..38.81 rows=1 width=187) (actual time=22,097.488..22,098.054 rows=18 loops=1)

35. 0.075 22,097.897 ↓ 18.0 18 1

Nested Loop (cost=10.29..30.36 rows=1 width=178) (actual time=22,097.468..22,097.897 rows=18 loops=1)

  • Join Filter: (historico.matrizcurricular = matricula.gradecurricularatual)
36. 0.051 22,097.516 ↓ 18.0 18 1

Nested Loop (cost=9.87..21.91 rows=1 width=162) (actual time=22,097.430..22,097.516 rows=18 loops=1)

37. 0.107 0.107 ↑ 1.0 1 1

Index Scan using idx_matriculaperiodo_matricula_ano_semestre on matriculaperiodo (cost=0.42..8.44 rows=1 width=39) (actual time=0.106..0.107 rows=1 loops=1)

  • Index Cond: ((matricula)::text = '02756700BLMD000104'::text)
38. 0.088 22,097.358 ↓ 18.0 18 1

Bitmap Heap Scan on historico (cost=9.45..13.46 rows=1 width=127) (actual time=22,097.305..22,097.358 rows=18 loops=1)

  • Recheck Cond: ((matriculaperiodo = matriculaperiodo.codigo) AND ((matricula)::text = '02756700BLMD000104'::text))
  • Filter: (((NOT historicoequivalente) OR (historicoequivalente IS NULL)) AND ((NOT historicodisciplinafazpartecomposicao) OR (historicodisciplinafazpartecomposicao IS NULL)))
  • Heap Blocks: exact=5
39. 22,097.169 22,097.270 ↓ 0.0 0 1

BitmapAnd (cost=9.45..9.45 rows=1 width=0) (actual time=22,097.270..22,097.270 rows=0 loops=1)

40. 0.072 0.072 ↑ 1.2 18 1

Bitmap Index Scan on idx_historico_matriculaperiodo (cost=0.00..4.59 rows=22 width=0) (actual time=0.072..0.072 rows=18 loops=1)

  • Index Cond: (matriculaperiodo = matriculaperiodo.codigo)
41. 0.029 0.029 ↑ 1.2 18 1

Bitmap Index Scan on idx_historico_matricula_gradedisciplina (cost=0.00..4.59 rows=22 width=0) (actual time=0.029..0.029 rows=18 loops=1)

  • Index Cond: ((matricula)::text = '02756700BLMD000104'::text)
42. 0.306 0.306 ↑ 1.0 1 18

Index Scan using matricula_pkey on matricula (cost=0.42..8.44 rows=1 width=30) (actual time=0.017..0.017 rows=1 loops=18)

  • Index Cond: ((matricula)::text = '02756700BLMD000104'::text)
43. 0.108 0.108 ↑ 1.0 1 18

Index Scan using matriculaperiodoturmadisciplina_pkey on matriculaperiodoturmadisciplina mptd (cost=0.43..8.45 rows=1 width=13) (actual time=0.006..0.006 rows=1 loops=18)

  • Index Cond: (codigo = historico.matriculaperiodoturmadisciplina)
44. 0.072 0.072 ↑ 1.0 1 18

Index Scan using turma_pkey on turma turmaestudo (cost=0.28..0.30 rows=1 width=13) (actual time=0.004..0.004 rows=1 loops=18)

  • Index Cond: (codigo = mptd.turma)
45. 0.072 0.072 ↑ 1.0 1 18

Index Scan using disciplina_pkey on disciplina (cost=0.28..6.48 rows=1 width=53) (actual time=0.004..0.004 rows=1 loops=18)

  • Index Cond: (codigo = historico.disciplina)
46. 0.018 0.018 ↓ 0.0 0 18

Index Scan using pk_configuracaoacademiconotaconceito on configuracaoacademiconotaconceito mfc (cost=0.14..2.16 rows=1 width=360) (actual time=0.001..0.001 rows=0 loops=18)

  • Index Cond: (codigo = historico.mediafinalconceito)
47. 0.072 0.072 ↑ 1.0 1 18

Index Scan using curso_pkey on curso cursomatricula (cost=0.27..8.29 rows=1 width=7) (actual time=0.004..0.004 rows=1 loops=18)

  • Index Cond: (codigo = matricula.curso)
48. 0.054 0.162 ↑ 1.0 1 18

Nested Loop Left Join (cost=0.55..8.61 rows=1 width=20) (actual time=0.007..0.009 rows=1 loops=18)

49. 0.072 0.072 ↑ 1.0 1 18

Index Scan using turma_pkey on turma (cost=0.28..8.30 rows=1 width=21) (actual time=0.002..0.004 rows=1 loops=18)

  • Index Cond: (codigo = matriculaperiodo.turma)
50. 0.036 0.036 ↑ 1.0 1 18

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

  • Index Cond: (codigo = turma.curso)
51.          

SubPlan (for Nested Loop Left Join)

52. 0.036 1.692 ↑ 1.0 1 18

Limit (cost=28.24..28.24 rows=1 width=16) (actual time=0.094..0.094 rows=1 loops=18)

53. 0.198 1.656 ↑ 1.0 1 18

Sort (cost=28.24..28.24 rows=1 width=16) (actual time=0.092..0.092 rows=1 loops=18)

  • Sort Key: his.dataregistro DESC, (CASE WHEN ((his.situacao)::text = ANY ('{AP,AA,CC,CH,AE,AB,CS,CE}'::text[])) THEN 0 ELSE 1 END), his.codigo DESC
  • Sort Method: quicksort Memory: 25kB
54. 0.144 1.458 ↑ 1.0 1 18

Bitmap Heap Scan on historico his (cost=24.20..28.23 rows=1 width=16) (actual time=0.080..0.081 rows=1 loops=18)

  • Recheck Cond: (((matricula)::text = (matricula.matricula)::text) AND (disciplina = disciplina.codigo))
  • Filter: (matrizcurricular = historico.matrizcurricular)
  • Heap Blocks: exact=18
55. 0.072 1.314 ↓ 0.0 0 18

BitmapAnd (cost=24.20..24.20 rows=1 width=0) (actual time=0.073..0.073 rows=0 loops=18)

56. 0.306 0.306 ↑ 1.2 18 18

Bitmap Index Scan on idx_historico_matricula_gradedisciplina (cost=0.00..4.59 rows=22 width=0) (actual time=0.017..0.017 rows=18 loops=18)

  • Index Cond: ((matricula)::text = (matricula.matricula)::text)
57. 0.936 0.936 ↑ 2.6 355 18

Bitmap Index Scan on ch_historico_disciplina (cost=0.00..19.35 rows=923 width=0) (actual time=0.052..0.052 rows=355 loops=18)

  • Index Cond: (disciplina = disciplina.codigo)
58. 0.144 0.144 ↑ 2.0 39 18

Seq Scan on unidadeensino (cost=0.00..6.78 rows=78 width=26) (actual time=0.002..0.008 rows=39 loops=18)

59. 0.090 0.090 ↑ 1.0 1 18

Index Scan using cidade_pkey on cidade (cost=0.29..4.87 rows=1 width=27) (actual time=0.005..0.005 rows=1 loops=18)

  • Index Cond: (codigo = unidadeensino.cidade)
60. 0.054 0.054 ↑ 1.0 1 18

Index Scan using estado_pkey on estado (cost=0.14..0.16 rows=1 width=6) (actual time=0.003..0.003 rows=1 loops=18)

  • Index Cond: (codigo = cidade.estado)
61. 0.054 0.054 ↑ 1.0 1 18

Index Scan using turno_pkey on turno (cost=0.14..0.16 rows=1 width=5) (actual time=0.003..0.003 rows=1 loops=18)

  • Index Cond: (codigo = turma.turno)
62. 0.072 0.072 ↑ 1.0 1 18

Index Only Scan using gradecurricular_pkey on gradecurricular (cost=0.28..1.20 rows=1 width=4) (actual time=0.004..0.004 rows=1 loops=18)

  • Index Cond: (codigo = historico.matrizcurricular)
  • Heap Fetches: 0
63. 0.090 0.090 ↑ 1.0 1 18

Index Scan using gradedisciplina_pkey on gradedisciplina (cost=0.29..7.21 rows=1 width=29) (actual time=0.005..0.005 rows=1 loops=18)

  • Index Cond: (codigo = historico.gradedisciplina)
64. 0.072 0.198 ↑ 1.0 1 18

Bitmap Heap Scan on periodoletivo (cost=1.93..5.96 rows=1 width=8) (actual time=0.010..0.011 rows=1 loops=18)

  • Recheck Cond: ((codigo = gradedisciplina.periodoletivo) OR (codigo = historico.periodoletivomatrizcurricular))
  • Filter: (((gradedisciplina.codigo IS NOT NULL) AND (codigo = gradedisciplina.periodoletivo)) OR ((gradedisciplina.codigo IS NULL) AND (codigo = historico.periodoletivomatrizcurricular)))
  • Heap Blocks: exact=18
65. 0.036 0.126 ↓ 0.0 0 18

BitmapOr (cost=1.93..1.93 rows=2 width=0) (actual time=0.007..0.007 rows=0 loops=18)

66. 0.072 0.072 ↑ 1.0 1 18

Bitmap Index Scan on periodoletivo_pkey (cost=0.00..0.28 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=18)

  • Index Cond: (codigo = gradedisciplina.periodoletivo)
67. 0.018 0.018 ↑ 1.0 1 18

Bitmap Index Scan on periodoletivo_pkey (cost=0.00..1.19 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=18)

  • Index Cond: (codigo = historico.periodoletivomatrizcurricular)
68. 0.018 0.018 ↓ 0.0 0 18

Index Scan using gradecurriculargrupooptativadisciplina_pkey on gradecurriculargrupooptativadisciplina (cost=0.14..0.70 rows=1 width=13) (actual time=0.001..0.001 rows=0 loops=18)

  • Index Cond: (codigo = historico.gradecurriculargrupooptativadisciplina)
69. 0.054 0.054 ↑ 1.0 1 18

Index Scan using configuracaoacademico_pkey on configuracaoacademico (cost=0.13..0.88 rows=1 width=13) (actual time=0.003..0.003 rows=1 loops=18)

  • Index Cond: (codigo = historico.configuracaoacademico)
70. 0.018 0.018 ↓ 0.0 0 18

Index Scan using disciplina_pkey on disciplina disciplinaeixotematico (cost=0.28..0.33 rows=1 width=49) (actual time=0.001..0.001 rows=0 loops=18)

  • Index Cond: (codigo = gradedisciplina.disciplinaeixotematico)
71. 0.000 0.000 ↓ 0.0 0 18

Index Scan using disciplinasaproveitadas_pkey on disciplinasaproveitadas (cost=0.29..7.21 rows=1 width=35) (actual time=0.000..0.000 rows=0 loops=18)

  • Index Cond: (codigo = historico.disciplinasaproveitadas)
72. 1.692 1.692 ↑ 1.0 899 18

Seq Scan on periodoletivo plmp (cost=0.00..20.99 rows=899 width=8) (actual time=0.004..0.094 rows=899 loops=18)

73. 0.001 0.005 ↓ 0.0 0 1

Hash (cost=18.80..18.80 rows=880 width=52) (actual time=0.005..0.005 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
74. 0.004 0.004 ↓ 0.0 0 1

Seq Scan on transferenciaentradadisciplinasaproveitadas (cost=0.00..18.80 rows=880 width=52) (actual time=0.004..0.004 rows=0 loops=1)

75. 0.098 0.227 ↑ 1.0 368 1

Hash (cost=14.68..14.68 rows=368 width=66) (actual time=0.226..0.227 rows=368 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 42kB
76. 0.129 0.129 ↑ 1.0 368 1

Seq Scan on transferenciaentrada (cost=0.00..14.68 rows=368 width=66) (actual time=0.011..0.129 rows=368 loops=1)

77. 0.018 0.018 ↓ 0.0 0 18

Index Scan using cidade_pkey on cidade cidadeap (cost=0.29..0.36 rows=1 width=27) (actual time=0.001..0.001 rows=0 loops=18)

  • Index Cond: (codigo = disciplinasaproveitadas.cidade)
78. 0.011 0.026 ↑ 1.0 41 1

Hash (cost=1.41..1.41 rows=41 width=6) (actual time=0.026..0.026 rows=41 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
79. 0.015 0.015 ↑ 1.0 41 1

Seq Scan on estado estadoap (cost=0.00..1.41 rows=41 width=6) (actual time=0.009..0.015 rows=41 loops=1)

80. 2.638 4.388 ↑ 1.0 10,631 1

Hash (cost=210.31..210.31 rows=10,631 width=27) (actual time=4.387..4.388 rows=10,631 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 763kB
81. 1.750 1.750 ↑ 1.0 10,631 1

Seq Scan on cidade cidadetrans (cost=0.00..210.31 rows=10,631 width=27) (actual time=0.011..1.750 rows=10,631 loops=1)

82. 0.011 0.028 ↑ 1.0 41 1

Hash (cost=1.41..1.41 rows=41 width=6) (actual time=0.028..0.028 rows=41 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
83. 0.017 0.017 ↑ 1.0 41 1

Seq Scan on estado estadotrans (cost=0.00..1.41 rows=41 width=6) (actual time=0.011..0.017 rows=41 loops=1)

84. 2.680 4.177 ↑ 1.0 10,631 1

Hash (cost=210.31..210.31 rows=10,631 width=27) (actual time=4.176..4.177 rows=10,631 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 763kB
85. 1.497 1.497 ↑ 1.0 10,631 1

Seq Scan on cidade cidadehistorico (cost=0.00..210.31 rows=10,631 width=27) (actual time=0.011..1.497 rows=10,631 loops=1)

86. 0.011 0.027 ↑ 1.0 41 1

Hash (cost=1.41..1.41 rows=41 width=6) (actual time=0.027..0.027 rows=41 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
87. 0.016 0.016 ↑ 1.0 41 1

Seq Scan on estado estadohistorico (cost=0.00..1.41 rows=41 width=6) (actual time=0.010..0.016 rows=41 loops=1)

88.          

SubPlan (for Group)

89. 0.036 0.720 ↑ 1.0 1 18

Aggregate (cost=226,086.38..226,086.39 rows=1 width=32) (actual time=0.040..0.040 rows=1 loops=18)

90. 0.018 0.684 ↑ 2.0 1 18

Unique (cost=226,086.35..226,086.36 rows=2 width=8) (actual time=0.037..0.038 rows=1 loops=18)

91. 0.090 0.666 ↑ 1.0 2 18

Sort (cost=226,086.35..226,086.35 rows=2 width=8) (actual time=0.036..0.037 rows=2 loops=18)

  • Sort Key: (CASE WHEN ((NOT turno.considerarhoraaulasessentaminutosgeracaodiario) OR (turno.considerarhoraaulasessentaminutosgeracaodiario IS NULL)) THEN (sum(registroaula.cargahoraria) / 60) ELSE sum(1) END)
  • Sort Method: quicksort Memory: 25kB
92. 0.018 0.576 ↑ 1.0 2 18

Append (cost=113,044.00..226,086.34 rows=2 width=8) (actual time=0.021..0.032 rows=2 loops=18)

93. 0.036 0.378 ↑ 1.0 1 18

Aggregate (cost=113,044.00..113,044.01 rows=1 width=8) (actual time=0.021..0.021 rows=1 loops=18)

94. 0.033 0.342 ↓ 0.0 0 18

Merge Join (cost=113,038.18..113,044.00 rows=1 width=4) (actual time=0.019..0.019 rows=0 loops=18)

  • Merge Cond: (registroaula.codigo = frequenciaaula.registroaula)
95. 0.036 0.252 ↑ 2.0 1 18

Sort (cost=113,037.74..113,037.75 rows=2 width=8) (actual time=0.014..0.014 rows=1 loops=18)

  • Sort Key: registroaula.codigo
  • Sort Method: quicksort Memory: 25kB
96. 0.216 0.216 ↑ 2.0 1 18

Index Scan using idx_registroaula_tur_dis_dat_prof on registroaula (cost=112,839.63..113,037.73 rows=2 width=8) (actual time=0.011..0.012 rows=1 loops=18)

  • Index Cond: (turma = mptd.turma)
  • Filter: ((NOT atividadecomplementar) AND ((ano)::text = (matriculaperiodo.ano)::text) AND ((semestre)::text = (matriculaperiodo.semestre)::text) AND CASE WHEN historico.historicodisciplinacomposta THEN (hashed SubPlan 2) ELSE (disciplina = disciplina.codigo) END)
  • Rows Removed by Filter: 11
97.          

SubPlan (for Index Scan)

98. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.00..112,839.21 rows=1 width=4) (never executed)

  • Join Filter: (h.gradedisciplinacomposta = gdc.codigo)
99. 0.000 0.000 ↓ 0.0 0

Seq Scan on gradedisciplinacomposta gdc (cost=0.00..14.00 rows=2 width=4) (never executed)

  • Filter: (gradedisciplina = historico.gradedisciplina)
100. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..112,825.18 rows=1 width=8) (never executed)

101. 0.000 0.000 ↓ 0.0 0

Seq Scan on historico h (cost=0.00..112,825.18 rows=1 width=8) (never executed)

  • Filter: historicodisciplinafazpartecomposicao
102. 0.057 0.057 ↑ 45.0 2 3

Index Only Scan using frequenciaaula_pkey on frequenciaaula (cost=0.43..6.01 rows=90 width=4) (actual time=0.018..0.019 rows=2 loops=3)

  • Index Cond: (matricula = (historico.matricula)::text)
  • Heap Fetches: 0
103. 0.018 0.180 ↑ 1.0 1 18

Aggregate (cost=113,042.28..113,042.29 rows=1 width=8) (actual time=0.010..0.010 rows=1 loops=18)

104. 0.018 0.162 ↓ 0.0 0 18

Nested Loop (cost=112,840.06..113,042.27 rows=1 width=4) (actual time=0.009..0.009 rows=0 loops=18)

105. 0.144 0.144 ↓ 0.0 0 18

Index Scan using idx_registroaula_tur_dis_dat_prof on registroaula registroaula_1 (cost=112,839.63..113,037.73 rows=1 width=8) (actual time=0.008..0.008 rows=0 loops=18)

  • Index Cond: (turma = mptd.turma)
  • Filter: (atividadecomplementar AND ((ano)::text = (matriculaperiodo.ano)::text) AND ((semestre)::text = (matriculaperiodo.semestre)::text) AND CASE WHEN historico.historicodisciplinacomposta THEN (hashed SubPlan 3) ELSE (disciplina = disciplina.codigo) END)
  • Rows Removed by Filter: 12
106.          

SubPlan (for Index Scan)

107. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.00..112,839.21 rows=1 width=4) (never executed)

  • Join Filter: (h_1.gradedisciplinacomposta = gdc_1.codigo)
108. 0.000 0.000 ↓ 0.0 0

Seq Scan on gradedisciplinacomposta gdc_1 (cost=0.00..14.00 rows=2 width=4) (never executed)

  • Filter: (gradedisciplina = historico.gradedisciplina)
109. 0.000 0.000 ↓ 0.0 0

Materialize (cost=0.00..112,825.18 rows=1 width=8) (never executed)

110. 0.000 0.000 ↓ 0.0 0

Seq Scan on historico h_1 (cost=0.00..112,825.18 rows=1 width=8) (never executed)

  • Filter: historicodisciplinafazpartecomposicao
111. 0.000 0.000 ↓ 0.0 0

Index Only Scan using frequenciaaula_pkey on frequenciaaula frequenciaaula_1 (cost=0.43..4.45 rows=1 width=4) (never executed)

  • Index Cond: ((matricula = (historico.matricula)::text) AND (registroaula = registroaula_1.codigo))
  • Heap Fetches: 0
112. 0.054 0.198 ↑ 1.0 1 18

Nested Loop (cost=0.57..16.61 rows=1 width=4) (actual time=0.010..0.011 rows=1 loops=18)

113. 0.090 0.090 ↑ 1.0 1 18

Index Scan using processomatriculacalendario_pkey on processomatriculacalendario (cost=0.28..8.30 rows=1 width=4) (actual time=0.004..0.005 rows=1 loops=18)

  • Index Cond: ((processomatricula = matriculaperiodo.processomatricula) AND (unidadeensinocurso = matriculaperiodo.unidadeensinocurso))
114. 0.054 0.054 ↑ 1.0 1 18

Index Scan using periodoletivoativounidadeensinocurso_pkey on periodoletivoativounidadeensinocurso (cost=0.29..8.30 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=18)

  • Index Cond: (codigo = processomatriculacalendario.periodoletivoativounidadeensinocurso)
115. 0.090 36.288 ↑ 1,000.0 1 18

Nested Loop Left Join (cost=0.96..19,870.75 rows=1,000 width=80) (actual time=2.012..2.016 rows=1 loops=18)

116. 0.126 35.658 ↑ 1,000.0 1 18

Nested Loop (cost=0.67..7,238.25 rows=1,000 width=49) (actual time=1.981..1.981 rows=1 loops=18)

117. 35.388 35.388 ↑ 1,000.0 1 18

Function Scan on periodoauladisciplinaaluno periodoauladisciplinaaluno_1 (cost=0.25..10.25 rows=1,000 width=48) (actual time=1.965..1.966 rows=1 loops=18)

118. 0.144 0.144 ↑ 1.0 1 18

Index Scan using pessoa_pkey on pessoa (cost=0.42..7.23 rows=1 width=5) (actual time=0.008..0.008 rows=1 loops=18)

  • Index Cond: (codigo = periodoauladisciplinaaluno_1.professor_codigo)
119. 0.246 0.540 ↑ 1.0 1 18

Index Scan using ch_formacaoacademica_pessoa on formacaoacademica (cost=0.29..12.60 rows=1 width=6) (actual time=0.027..0.030 rows=1 loops=18)

  • Index Cond: (pessoa = periodoauladisciplinaaluno_1.professor_codigo)
  • Filter: (codigo = (SubPlan 1))
  • Rows Removed by Filter: 0
120.          

SubPlan (for Index Scan)

121. 0.063 0.294 ↑ 1.0 1 21

Limit (cost=8.34..8.35 rows=1 width=8) (actual time=0.013..0.014 rows=1 loops=21)

122. 0.105 0.231 ↑ 1.0 1 21

Sort (cost=8.34..8.35 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=21)

  • Sort Key: (CASE fa.escolaridade WHEN 'EF'::text THEN 1 WHEN 'EM'::text THEN 2 WHEN 'TE'::text THEN 3 WHEN 'GR'::text THEN 4 WHEN 'EP'::text THEN 5 WHEN 'PO'::text THEN 6 WHEN 'MS'::text THEN 7 WHEN 'DR'::text THEN 8 WHEN 'PD'::text THEN 9 ELSE 10 END) DESC
  • Sort Method: quicksort Memory: 25kB
123. 0.126 0.126 ↓ 2.0 2 21

Index Scan using ch_formacaoacademica_pessoa on formacaoacademica fa (cost=0.29..8.33 rows=1 width=8) (actual time=0.005..0.006 rows=2 loops=21)

  • Index Cond: (pessoa = formacaoacademica.pessoa)
124. 0.036 0.630 ↓ 0.0 0 18

Unique (cost=15.75..15.76 rows=1 width=31) (actual time=0.035..0.035 rows=0 loops=18)

125. 0.072 0.594 ↓ 0.0 0 18

Sort (cost=15.75..15.75 rows=1 width=31) (actual time=0.033..0.033 rows=0 loops=18)

  • Sort Key: localaula_1.local, salalocalaula.sala
  • Sort Method: quicksort Memory: 25kB
126. 0.108 0.522 ↓ 0.0 0 18

Nested Loop (cost=8.60..15.74 rows=1 width=31) (actual time=0.029..0.029 rows=0 loops=18)

127. 0.099 0.414 ↓ 0.0 0 18

Hash Join (cost=8.45..15.52 rows=1 width=15) (actual time=0.023..0.023 rows=0 loops=18)

  • Hash Cond: (salalocalaula.codigo = horarioturmadiaitem.sala)
128. 0.009 0.009 ↑ 295.0 1 1

Seq Scan on salalocalaula (cost=0.00..5.95 rows=295 width=19) (actual time=0.009..0.009 rows=1 loops=1)

129. 0.054 0.306 ↓ 0.0 0 18

Hash (cost=8.44..8.44 rows=1 width=4) (actual time=0.017..0.017 rows=0 loops=18)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
130. 0.252 0.252 ↑ 1.0 1 18

Index Scan using idx_horturdiaitem_disc_prof on horarioturmadiaitem (cost=0.42..8.44 rows=1 width=4) (actual time=0.013..0.014 rows=1 loops=18)

  • Index Cond: ((disciplina = periodoauladisciplinaaluno_1.disciplina_codigo) AND (professor = periodoauladisciplinaaluno_1.professor_codigo))
  • Filter: (data = periodoauladisciplinaaluno_1.datainicio)
  • Rows Removed by Filter: 6
131. 0.000 0.000 ↓ 0.0 0

Index Scan using localaula_pkey on localaula localaula_1 (cost=0.14..0.21 rows=1 width=24) (never executed)

  • Index Cond: (codigo = salalocalaula.localaula)
Execution time : 22,286.275 ms