explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cZPd

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 7,291.874 ↓ 0.0 0 1

HashAggregate (cost=53.01..53.02 rows=1 width=47) (actual time=7,291.874..7,291.874 rows=0 loops=1)

  • Group Key: funcionario.matricula, funcionario.pessoa, funcionario.dataadmissao, funcionario.codigo, funcionario.exercecargoadministrativo, funcionario.nomebanco, funcionario.numerobancorecebimento, funcionario.numeroagenciarecebimento, funcionario.contacorrenterecebimento, funcionario.codigoant, funcionario.codigoantsei, funcionario.remover, funcionario.observacao, funcionario.escolaridade, funcionario.arquivoassinatura, funcionario.empresarecebimento, funcionario.cnpjempresarecebimento, funcionario.digitoagenciarecebimento, funcionario.digitocorrenterecebimento, funcionario.operacaobancaria
2. 0.002 7,291.873 ↓ 0.0 0 1

Nested Loop (cost=15.76..52.96 rows=1 width=47) (actual time=7,291.873..7,291.873 rows=0 loops=1)

3. 0.001 7,291.871 ↓ 0.0 0 1

Nested Loop (cost=15.20..48.12 rows=1 width=60) (actual time=7,291.871..7,291.871 rows=0 loops=1)

4. 0.396 7,291.870 ↓ 0.0 0 1

Nested Loop (cost=14.91..39.81 rows=1 width=61) (actual time=7,291.870..7,291.870 rows=0 loops=1)

5. 0.405 7,290.110 ↓ 341.0 341 1

Nested Loop (cost=14.62..33.04 rows=1 width=55) (actual time=7,288.732..7,290.110 rows=341 loops=1)

  • Join Filter: (horarioturmadetalhado.turma = matriculaperiodoturmadisciplina.turma)
6. 0.022 7,288.853 ↓ 6.0 6 1

Nested Loop Left Join (cost=14.20..24.82 rows=1 width=67) (actual time=7,288.710..7,288.853 rows=6 loops=1)

7. 0.018 7,288.777 ↓ 6.0 6 1

Nested Loop (cost=13.91..24.50 rows=1 width=71) (actual time=7,288.672..7,288.777 rows=6 loops=1)

8. 0.025 7,288.723 ↓ 6.0 6 1

Nested Loop (cost=13.50..21.75 rows=1 width=75) (actual time=7,288.655..7,288.723 rows=6 loops=1)

  • Join Filter: (horarioturmadetalhado.professor = funcionario.pessoa)
9. 0.023 7,288.668 ↓ 6.0 6 1

Nested Loop (cost=13.22..21.28 rows=1 width=28) (actual time=7,288.637..7,288.668 rows=6 loops=1)

10. 0.111 7,288.560 ↓ 5.0 5 1

HashAggregate (cost=12.80..12.81 rows=1 width=16) (actual time=7,288.555..7,288.560 rows=5 loops=1)

  • Group Key: horarioturmadetalhado.horarioturma, horarioturmadetalhado.disciplina, horarioturmadetalhado.professor, horarioturmadetalhado.turma
11. 7,288.449 7,288.449 ↓ 22.0 110 1

Function Scan on horarioturmadetalhado (cost=0.25..12.75 rows=5 width=16) (actual time=7,100.111..7,288.449 rows=110 loops=1)

  • Filter: (disciplina = 59)
  • Rows Removed by Filter: 456828
12. 0.085 0.085 ↑ 1.0 1 5

Index Scan using idx_registroaula_tur_dis_dat_prof on registroaula ra (cost=0.42..8.45 rows=1 width=16) (actual time=0.015..0.017 rows=1 loops=5)

  • Index Cond: ((turma = horarioturmadetalhado.turma) AND (disciplina = 59) AND (professor = horarioturmadetalhado.professor))
13. 0.030 0.030 ↑ 1.0 1 6

Index Scan using idx_funcionario_pessoa on funcionario (cost=0.28..0.46 rows=1 width=47) (actual time=0.004..0.005 rows=1 loops=6)

  • Index Cond: (pessoa = ra.professor)
14. 0.036 0.036 ↑ 1.0 1 6

Index Only Scan using pessoa_pkey on pessoa (cost=0.41..2.74 rows=1 width=4) (actual time=0.005..0.006 rows=1 loops=6)

  • Index Cond: (codigo = funcionario.pessoa)
  • Heap Fetches: 6
15. 0.054 0.054 ↑ 1.0 1 6

Index Only Scan using ch_formacaoacademica_pessoa on formacaoacademica (cost=0.29..0.31 rows=1 width=4) (actual time=0.008..0.009 rows=1 loops=6)

  • Index Cond: (pessoa = pessoa.codigo)
  • Heap Fetches: 6
16. 0.852 0.852 ↓ 57.0 57 6

Index Scan using matriculaperiodoturmadisciplina_turma_disciplina_matricula on matriculaperiodoturmadisciplina (cost=0.42..8.20 rows=1 width=12) (actual time=0.013..0.142 rows=57 loops=6)

  • Index Cond: ((turma = ra.turma) AND (disciplina = 59))
17. 1.364 1.364 ↓ 0.0 0 341

Index Scan using matriculaperiodo_pkey on matriculaperiodo (cost=0.29..6.76 rows=1 width=14) (actual time=0.004..0.004 rows=0 loops=341)

  • Index Cond: (codigo = matriculaperiodoturmadisciplina.matriculaperiodo)
  • Filter: ((matricula)::text = '152ENG00018'::text)
  • Rows Removed by Filter: 1
18. 0.000 0.000 ↓ 0.0 0

Index Scan using matricula_pkey on matricula (cost=0.29..8.30 rows=1 width=9) (never executed)

  • Index Cond: ((matricula)::text = '152ENG00018'::text)
  • Filter: (unidadeensino = 29)
19. 0.000 0.000 ↓ 0.0 0

Index Only Scan using frequenciaaula_pkey on frequenciaaula fa (cost=0.56..4.83 rows=1 width=14) (never executed)

  • Index Cond: ((matricula = '152ENG00018'::text) AND (registroaula = ra.codigo))
  • Heap Fetches: 0