QUERY PLAN
GroupAggregate (cost=195.70..196.02 rows=10 width=12)
Group Key: parent_id
-> Sort (cost=195.70..195.78 rows=29 width=4)
Sort Key: parent_id
-> Seq Scan on tbl_tasks (cost=0.00..195.00 rows=29 width=4)
Filter: ((status = 1) AND (parent_id = ANY ('{1189,1242,1240,1239,1256,1252,1249,1248,1247,1246,1245,1244,1243,1238,1226,1225,1224,1223,1222,1221,1220,1218,1217,1216,1215,1213,1212,1211,1210,1209,1195,1187}'::integer[])))