QUERY PLAN
GroupAggregate (cost=46.59..46.62 rows=2 width=12)
Group Key: task_group_id
-> Sort (cost=46.59..46.59 rows=2 width=4)
Sort Key: task_group_id
-> Seq Scan on tbl_tasks (cost=0.00..46.58 rows=2 width=4)
Filter: ((status = 0) AND (task_group_id = ANY ('{105,99,98,97,96,94,93,89,88,87}'::integer[])))