QUERY PLAN
GroupAggregate (cost=73.14..73.43 rows=12 width=12)
Group Key: parent_id
-> Sort (cost=73.14..73.19 rows=23 width=4)
Sort Key: parent_id
-> Seq Scan on tbl_tasks (cost=0.00..72.62 rows=23 width=4)
Filter: (parent_id = ANY ('{1535,1547,1546,1548,1543,1549,1544,1565,1596,1641,1662,1661,1647,1667,1669,1668,1580,1578,1577,1576}'::integer[]))