QUERY PLAN
Sort (cost=10.90..10.90 rows=1 width=21)
Sort Key: u.name
-> Group (cost=10.88..10.89 rows=1 width=21)
Group Key: s.id, u.id
-> Sort (cost=10.88..10.88 rows=1 width=21)
Sort Key: s.id, u.id
-> Nested Loop (cost=0.14..10.87 rows=1 width=21)
-> Seq Scan on tbl_visible_approves s (cost=0.00..2.09 rows=1 width=8)
Filter: ((accessible_user IS NOT NULL) AND (user_id = 1011))
-> Index Scan using tbl_users_pkey on tbl_users u (cost=0.14..8.16 rows=1 width=13)
Index Cond: (id = s.accessible_user)
Filter: (user_status = '1'::type_global_user_status)