QUERY PLAN
GroupAggregate (cost=118.60..118.69 rows=5 width=12)
Group Key: remain_task.task_group_id
-> Sort (cost=118.60..118.61 rows=5 width=4)
Sort Key: remain_task.task_group_id
-> Hash Anti Join (cost=57.75..118.54 rows=5 width=4)
Hash Cond: (remain_task.id = child_task.parent_id)
-> Seq Scan on tbl_tasks remain_task (cost=0.00..60.73 rows=5 width=8)
Filter: ((status <> 1) AND (task_group_id = ANY ('{203,202,201,200,199,198,197,196,194,193}'::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)