explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dpzz

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

Unique (cost=139,951.83..139,951.96 rows=9 width=88) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=139,951.83..139,951.85 rows=9 width=88) (actual rows= loops=)

  • Sort Key: p2.id, (initcap((p2.name1)::text)), (initcap((p2.name2)::text)), r2.status, r2.study_year_id
3. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=1.28..139,951.69 rows=9 width=88) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.86..139,933.08 rows=9 width=24) (actual rows= loops=)

  • Join Filter: ((r.class_level_id = r2.class_level_id) AND (COALESCE(r.parallel_identifier_id, '0'::bigint) = COALESCE(r2.parallel_identifier_id, '0'::bigint)))
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.86..51.32 rows=1 width=16) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Index Only Scan using person_pkey on person (cost=0.43..8.45 rows=1 width=8) (actual rows= loops=)

  • Index Cond: (id = '14812101711'::bigint)
7. 0.000 0.000 ↓ 0.0

Index Scan using i_role_person on role r (cost=0.43..42.86 rows=1 width=24) (actual rows= loops=)

  • Index Cond: (person_id = '14812101711'::bigint)
  • Filter: (institution_id = 35)
8. 0.000 0.000 ↓ 0.0

Seq Scan on role r2 (cost=0.00..138,510.09 rows=91,445 width=40) (actual rows= loops=)

  • Filter: (type_id = 5)
9. 0.000 0.000 ↓ 0.0

Index Scan using person_pkey on person p2 (cost=0.43..2.05 rows=1 width=22) (actual rows= loops=)

  • Index Cond: (r2.person_id = id)