explain.depesz.com

PostgreSQL's explain analyze made readable

Result: juwY

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

Group (cost=15,328.51..15,328.53 rows=1 width=103) (actual rows= loops=)

  • Group Key: ct.id, rt.id, ut.id, ct2.id, rt2.id
2. 0.000 0.000 ↓ 0.0

Sort (cost=15,328.51..15,328.52 rows=1 width=103) (actual rows= loops=)

  • Sort Key: ct.id, rt.id, ut.id, ct2.id, rt2.id
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=5,073.43..15,328.50 rows=1 width=103) (actual rows= loops=)

  • Join Filter: (ct2.id <> ct.id)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=5,073.29..15,328.33 rows=1 width=89) (actual rows= loops=)

  • Join Filter: (ct.display_name = mt.condition_name)
5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=5,073.02..15,328.02 rows=1 width=97) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Merge Left Join (cost=5,072.59..13,092.39 rows=1 width=89) (actual rows= loops=)

  • Merge Cond: (ut.id = rt2.user_id)
  • Join Filter: (rt2.condition_id = ct.id)
  • Filter: (rt2.id IS NULL)
7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=2,556.38..9,052.09 rows=167,690 width=73) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Merge Join (cost=2,556.38..6,953.10 rows=23,956 width=51) (actual rows= loops=)

  • Merge Cond: (ut.id = rt.user_id)
9. 0.000 0.000 ↓ 0.0

Index Scan using pk_users on users ut (cost=0.29..3,933.71 rows=63,628 width=31) (actual rows= loops=)

  • Filter: (email IS NOT NULL)
10. 0.000 0.000 ↓ 0.0

Sort (cost=2,516.21..2,580.32 rows=25,642 width=28) (actual rows= loops=)

  • Sort Key: rt.user_id
11. 0.000 0.000 ↓ 0.0

Seq Scan on response rt (cost=0.00..638.42 rows=25,642 width=28) (actual rows= loops=)

12. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..2.86 rows=7 width=22) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Seq Scan on condition ct (cost=0.00..2.83 rows=7 width=22) (actual rows= loops=)

  • Filter: (id = ANY ('{22379,4438,22384,22382,2223,1898,22390}'::bigint[]))
14. 0.000 0.000 ↓ 0.0

Sort (cost=2,516.21..2,580.32 rows=25,642 width=24) (actual rows= loops=)

  • Sort Key: rt2.user_id
15. 0.000 0.000 ↓ 0.0

Seq Scan on response rt2 (cost=0.00..638.42 rows=25,642 width=24) (actual rows= loops=)

16. 0.000 0.000 ↓ 0.0

Index Scan using norm_answer_response_idx on normalized_answer nat (cost=0.42..2,235.62 rows=1 width=16) (actual rows= loops=)

  • Index Cond: (response_id = rt.id)
  • Filter: (entity = 'morbidity'::normalized_type)
17. 0.000 0.000 ↓ 0.0

Index Scan using pk_morbidity on morbidity mt (cost=0.28..0.30 rows=1 width=28) (actual rows= loops=)

  • Index Cond: (id = nat.entity_id)
18. 0.000 0.000 ↓ 0.0

Index Scan using pk_condition on condition ct2 (cost=0.14..0.16 rows=1 width=22) (actual rows= loops=)

  • Index Cond: (id = rt.condition_id)