QUERY PLAN
GroupAggregate (cost=118.70..118.84 rows=8 width=12)
Group Key: remain_task.task_group_id
-> Sort (cost=118.70..118.72 rows=8 width=4)
Sort Key: remain_task.task_group_id
-> Hash Anti Join (cost=57.75..118.58 rows=8 width=4)
Hash Cond: (remain_task.id = child_task.parent_id)
-> Seq Scan on tbl_tasks remain_task (cost=0.00..60.73 rows=8 width=8)
Filter: ((status <> 1) AND (task_group_id = ANY ('{203,202,201,189,188,187,94,90,88,87}'::integer[])))
-> Hash (cost=42.89..42.89 rows=1189 width=4)
-> Seq Scan on tbl_tasks child_task (cost=0.00..42.89 rows=1189 width=4)