QUERY PLAN
GroupAggregate (cost=177.38..177.60 rows=9 width=12)
Group Key: parent_id
-> Sort (cost=177.38..177.42 rows=18 width=4)
Sort Key: parent_id
-> Seq Scan on tbl_tasks (cost=0.00..177.00 rows=18 width=4)
Filter: ((status = 1) AND (parent_id = ANY ('{1189,1242,1240,1239,1252,1249,1248,1246,1245,1238,1226,1225,1220,1218,1217,1213,1212,1187,1244,1243}'::integer[])))