explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kKkb

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1,537.91..1,537.92 rows=1 width=14) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,521.62..1,537.91 rows=1 width=14) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,521.62..1,530.89 rows=1 width=8) (actual rows= loops=)

  • Join Filter: (cc.id_componente_curricular = cc.id_componente_curricular)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,521.62..1,530.31 rows=1 width=12) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Index Only Scan using pki_curriculo_id_curriculo on curriculo c (cost=0.00..8.27 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id_curriculo = 1)
6. 0.000 0.000 ↓ 0.0

HashAggregate (cost=1,521.62..1,521.83 rows=21 width=8) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,218.59..1,521.57 rows=21 width=8) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,218.59..1,504.36 rows=21 width=12) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Index Scan using pki_curriculo_id_curriculo on curriculo cur (cost=0.00..8.27 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id_curriculo = 57215560)
  • Filter: (id_curso = 1)
10. 0.000 0.000 ↓ 0.0

Hash Join (cost=1,218.59..1,495.88 rows=21 width=16) (actual rows= loops=)

  • Hash Cond: (cc.id_componente_curricular = comp.id_disciplina)
11. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on curriculo_componente cc (cost=5.17..281.83 rows=41 width=8) (actual rows= loops=)

  • Recheck Cond: (id_curriculo = 57215560)
  • Filter: obrigatoria
12. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on fki_id_curriculo_fk (cost=0.00..5.16 rows=120 width=0) (actual rows= loops=)

  • Index Cond: (id_curriculo = 57215560)
13. 0.000 0.000 ↓ 0.0

Hash (cost=1,068.25..1,068.25 rows=11,614 width=8) (actual rows= loops=)

14. 0.000 0.000 ↓ 0.0

Seq Scan on componente_curricular comp (cost=135.91..1,068.25 rows=11,614 width=8) (actual rows= loops=)

  • Filter: (NOT (hashed SubPlan 1))
15.          

SubPlan (for Seq Scan)

16. 0.000 0.000 ↓ 0.0

Index Scan using "ID" on matricula_componente mc (cost=0.00..135.80 rows=45 width=4) (actual rows= loops=)

  • Index Cond: (id_discente = 1)
  • Filter: (id_situacao_matricula = ANY ('{4,27,22,21,23}'::integer[]))
17. 0.000 0.000 ↓ 0.0

Index Only Scan using disciplina_detalhes_pkey on componente_curricular_detalhes det (cost=0.00..0.81 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (id_componente_detalhes = comp.id_detalhe)
18. 0.000 0.000 ↓ 0.0

Index Scan using fki_id_componente_curricular_fk on curriculo_componente cc (cost=0.00..0.57 rows=1 width=12) (actual rows= loops=)

  • Index Cond: (id_componente_curricular = comp.id_disciplina)
  • Filter: (id_curriculo = 1)
19. 0.000 0.000 ↓ 0.0

Index Scan using id_relacao_componente_curriculo_pk on relacao_componente_curriculo rcc (cost=0.00..7.00 rows=1 width=14) (actual rows= loops=)

  • Index Cond: (id_relacao_componente_curriculo = cc.id_curriculo_componente)