explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uMTk

Settings
# exclusive inclusive rows x rows loops node
1. 0.084 3,835.267 ↑ 1.0 1 1

Aggregate (cost=34.86..34.87 rows=1 width=4) (actual time=3,835.266..3,835.267 rows=1 loops=1)

2. 0.062 0.391 ↓ 18.0 18 1

Nested Loop (cost=10.75..34.85 rows=1 width=4) (actual time=0.075..0.391 rows=18 loops=1)

3. 0.024 0.131 ↓ 18.0 18 1

Nested Loop (cost=10.32..26.39 rows=1 width=4) (actual time=0.070..0.131 rows=18 loops=1)

4. 0.004 0.041 ↑ 1.0 1 1

Nested Loop (cost=0.84..12.88 rows=1 width=18) (actual time=0.035..0.041 rows=1 loops=1)

5. 0.022 0.022 ↑ 1.0 1 1

Index Only Scan using matricula_pkey on matricula (cost=0.42..4.44 rows=1 width=14) (actual time=0.020..0.022 rows=1 loops=1)

  • Index Cond: (matricula = '043430000BIM000020'::text)
  • Heap Fetches: 1
6. 0.015 0.015 ↑ 1.0 1 1

Index Scan using idx_matriculaperiodo_matricula_ano_semestre on matriculaperiodo (cost=0.42..8.44 rows=1 width=18) (actual time=0.013..0.015 rows=1 loops=1)

  • Index Cond: ((matricula)::text = '043430000BIM000020'::text)
7. 0.037 0.066 ↓ 18.0 18 1

Bitmap Heap Scan on matriculaperiodoturmadisciplina (cost=9.48..13.49 rows=1 width=21) (actual time=0.033..0.066 rows=18 loops=1)

  • Recheck Cond: ((matriculaperiodo = matriculaperiodo.codigo) AND ((matricula)::text = '043430000BIM000020'::text))
  • Heap Blocks: exact=5
8. 0.003 0.029 ↓ 0.0 0 1

BitmapAnd (cost=9.48..9.48 rows=1 width=0) (actual time=0.029..0.029 rows=0 loops=1)

9. 0.008 0.008 ↑ 1.3 18 1

Bitmap Index Scan on ch_matriculaperiodoturmadisciplina_matriculaperiodo (cost=0.00..4.61 rows=24 width=0) (actual time=0.008..0.008 rows=18 loops=1)

  • Index Cond: (matriculaperiodo = matriculaperiodo.codigo)
10. 0.018 0.018 ↑ 1.3 18 1

Bitmap Index Scan on idx_matriculaperiodoturmadisciplina_matricula (cost=0.00..4.61 rows=24 width=0) (actual time=0.018..0.018 rows=18 loops=1)

  • Index Cond: ((matricula)::text = '043430000BIM000020'::text)
11. 0.198 0.198 ↑ 1.0 1 18

Index Scan using index_historico_matriculaperiodoturmadisciplina on historico (cost=0.43..8.45 rows=1 width=8) (actual time=0.010..0.011 rows=1 loops=18)

  • Index Cond: (matriculaperiodoturmadisciplina = matriculaperiodoturmadisciplina.codigo)
12.          

SubPlan (forAggregate)

13. 3,834.792 3,834.792 ↓ 0.0 0 18

Function Scan on periodoauladisciplinaaluno (cost=0.00..0.01 rows=1 width=4) (actual time=213.044..213.044 rows=0 loops=18)

Planning time : 0.854 ms
Execution time : 3,835.370 ms