QUERY PLAN
GroupAggregate (cost=175.90..176.22 rows=17 width=12)
Group Key: task_group_id
-> Sort (cost=175.90..175.95 rows=19 width=4)
Sort Key: task_group_id
-> Seq Scan on tbl_tasks (cost=0.00..175.50 rows=19 width=4)
Filter: ((parent_id IS NULL) AND (status = 0) AND (task_group_id = ANY ('{96,94,90,89,88,87,85,84,83,80,79,78,76,75,74,73,72,71,70}'::integer[])))