QUERY PLAN
Group (cost=13.37..13.38 rows=1 width=12)
Group Key: u.id, s.id
-> Sort (cost=13.37..13.37 rows=1 width=12)
Sort Key: u.id, s.id
-> Nested Loop (cost=0.14..13.36 rows=1 width=12)
-> Seq Scan on tbl_visible_work_logs s (cost=0.00..4.58 rows=1 width=8)
Filter: ((accessible_user IS NOT NULL) AND (user_id = 5085))
-> Index Scan using tbl_users_pkey on tbl_users u (cost=0.14..8.16 rows=1 width=4)
Index Cond: (id = s.accessible_user)
Filter: (user_status = '1'::type_global_user_status)