QUERY PLAN
GroupAggregate (cost=177.32..177.59 rows=15 width=12)
Group Key: task_group_id
-> Sort (cost=177.32..177.36 rows=16 width=4)
Sort Key: task_group_id
-> Seq Scan on tbl_tasks (cost=0.00..177.00 rows=16 width=4)
Filter: ((parent_id IS NULL) AND (status = 0) AND (task_group_id = ANY ('{187,139,106,96,94,90,89,88,87,86,85,84,83,80,79,78,76,75,74,73}'::integer[])))