QUERY PLAN
GroupAggregate (cost=280.63..280.92 rows=16 width=12)
Group Key: task_group_id
-> Sort (cost=280.63..280.67 rows=18 width=4)
Sort Key: task_group_id
-> Seq Scan on tbl_tasks (cost=0.00..280.25 rows=18 width=4)
Filter: ((parent_id IS NULL) AND (status = 0) AND (task_group_id = ANY ('{204,203,202,201,200,199,198,197,196,195,194,193,192,191,190,189,188,187,178,141,140,139,106,105,99,98,97,96,94,93,90,89,88,87,86,85,84,83,82,80,79,78,77,76,75,74,73,72,71,70,69,68,67,65,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,43,42,41,40,38,37,35,33,32,30,23,22,19,14,13,12,4,3}'::integer[])))