QUERY PLAN
Limit (cost=38.09..38.12 rows=10 width=448)
-> Sort (cost=38.09..38.29 rows=80 width=448)
Sort Key: s.created_at DESC
-> HashAggregate (cost=34.96..36.36 rows=80 width=448)
Group Key: s.id
-> Hash Right Join (cost=11.34..32.27 rows=1076 width=428)
Hash Cond: (turs.task_group_id = s.id)
-> Seq Scan on tbl_task_group_user_relationships turs (cost=0.00..7.78 rows=478 width=4)
-> Hash (cost=9.09..9.09 rows=180 width=428)
-> Hash Right Join (cost=5.80..9.09 rows=180 width=428)
Hash Cond: (thrs.task_group_id = s.id)
-> Seq Scan on tbl_task_group_head_of_relationships thrs (cost=0.00..2.80 rows=180 width=4)
-> Hash (cost=4.80..4.80 rows=80 width=428)
-> Seq Scan on tbl_task_groups s (cost=0.00..4.80 rows=80 width=428)