QUERY PLAN
Sort (cost=37.38..37.74 rows=142 width=21)
Sort Key: u.name
-> HashAggregate (cost=30.88..32.30 rows=142 width=21)
Group Key: s.id, u.id
-> Hash Left Join (cost=18.24..30.17 rows=142 width=21)
Hash Cond: (s.accessible_user = u.id)
-> Seq Scan on tbl_erp_other_collect_ticket_visibles s (cost=0.00..11.55 rows=142 width=8)
Filter: ((accessible_user IS NOT NULL) AND (user_id = 1013))
-> Hash (cost=16.44..16.44 rows=144 width=13)
-> Seq Scan on tbl_users u (cost=0.00..16.44 rows=144 width=13)