QUERY PLAN
GroupAggregate (cost=177.40..177.72 rows=17 width=12)
Group Key: task_group_id
-> Sort (cost=177.40..177.45 rows=19 width=4)
Sort Key: task_group_id
-> Seq Scan on tbl_tasks (cost=0.00..177.00 rows=19 width=4)
Filter: ((parent_id IS NULL) AND (status = 0) AND (task_group_id = ANY ('{86,85,84,83,82,80,79,78,77,76,75,74,73,72,71,70,69,68,67,65}'::integer[])))