QUERY PLAN
Limit (cost=62.17..62.19 rows=10 width=194)
-> Sort (cost=62.17..62.32 rows=59 width=194)
Sort Key: s.created_at
-> HashAggregate (cost=60.30..60.89 rows=59 width=194)
Group Key: s.id, u.id
-> Hash Left Join (cost=12.11..60.01 rows=59 width=194)
Hash Cond: (s.head_of = u.id)
-> Seq Scan on tbl_tasks s (cost=0.00..47.75 rows=59 width=190)
Filter: ((parent_id IS NULL) AND (task_group_id = 106))
-> Hash (cost=10.30..10.30 rows=144 width=4)
-> Index Only Scan using tbl_users_pkey on tbl_users u (cost=0.14..10.30 rows=144 width=4)