QUERY PLAN
Sort (cost=13.06..13.06 rows=3 width=21)
Sort Key: u.name
-> Group (cost=13.01..13.03 rows=3 width=21)
Group Key: s.id, u.id
-> Sort (cost=13.01..13.02 rows=3 width=21)
Sort Key: s.id, u.id
-> Hash Join (cost=8.10..12.99 rows=3 width=21)
Hash Cond: (s.accessible_user = u.id)
-> Seq Scan on tbl_visible_schedules s (cost=0.00..4.84 rows=19 width=8)
Filter: ((accessible_user IS NOT NULL) AND (user_id = 1015))
-> Hash (cost=7.80..7.80 rows=24 width=13)
-> Seq Scan on tbl_users u (cost=0.00..7.80 rows=24 width=13)
Filter: (user_status = '1'::type_global_user_status)