explain.depesz.com

PostgreSQL's explain analyze made readable

Result: l0C8

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 3,242.544 ↓ 0.0 0 1

Limit (cost=0.72..1,374.82 rows=1 width=51) (actual time=3,242.543..3,242.544 rows=0 loops=1)

  • Output: "Nota".id, "Nota".nota, "Nota".cursos_livro_id, "Nota".matricula_id, "Nota".sub, "Nota".created, "Nota".updated, "Nota".observacao, "Nota".creditos_livro_id, "Nota".user_id, "Nota".data_lancamento_sub
2. 1,160.308 3,242.542 ↓ 0.0 0 1

Nested Loop (cost=0.72..278,943.33 rows=203 width=51) (actual time=3,242.541..3,242.542 rows=0 loops=1)

  • Output: "Nota".id, "Nota".nota, "Nota".cursos_livro_id, "Nota".matricula_id, "Nota".sub, "Nota".created, "Nota".updated, "Nota".observacao, "Nota".creditos_livro_id, "Nota".user_id, "Nota".data_lancamento_sub
  • Inner Unique: true
3. 599.678 599.678 ↑ 1.0 741,278 1

Index Scan Backward using pk_nota on public.notas "Nota" (cost=0.42..40,661.01 rows=744,136 width=51) (actual time=0.069..599.678 rows=741,278 loops=1)

  • Output: "Nota".id, "Nota".nota, "Nota".cursos_livro_id, "Nota".matricula_id, "Nota".sub, "Nota".created, "Nota".updated, "Nota".observacao, "Nota".creditos_livro_id, "Nota".user_id, "Nota".data_lancamento_sub
4. 1,482.556 1,482.556 ↓ 0.0 0 741,278

Index Scan using pk_matriculas on public.matriculas "Matricula" (cost=0.29..0.32 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=741,278)

  • Output: "Matricula".id, "Matricula".aluno_id, "Matricula".datamatricula, "Matricula".dataencerramento, "Matricula".situacao, "Matricula".nucleo_id, "Matricula".created, "Matricula".updated, "Matricula".user_id, "Matricula".tipo
  • Index Cond: ("Matricula".id = "Nota".matricula_id)
  • Filter: ("Matricula".nucleo_id = 4739)
  • Rows Removed by Filter: 1
Planning time : 1.299 ms
Execution time : 3,242.641 ms