Aggregate (cost=400.63..400.64 rows=1 width=8) |
-> Sort (cost=400.61..400.62 rows=1 width=285) |
Sort Key: c.updated_at DESC |
-> Group (cost=400.60..400.60 rows=1 width=285) |
Group Key: c.id |
-> Sort (cost=400.60..400.60 rows=1 width=12) |
Sort Key: c.id |
-> Nested Loop (cost=0.28..400.59 rows=1 width=12) |
-> Seq Scan on tbl_case_assignments ca (cost=0.00..205.23 rows=29 width=4) |
Filter: ((assignment_status = ANY ('{1,2}'::integer[])) AND (engineer_id = 1001)) |
-> Index Scan using tbl_cases_pkey on tbl_cases c (cost=0.28..6.65 rows=1 width=12) |
Index Cond: (id = ca.case_id) |
Filter: (case_status = ANY ('{1,2,3}'::integer[])) |