QUERY PLAN
GroupAggregate (cost=516.41..516.76 rows=20 width=12)
Group Key: case_id
-> Sort (cost=516.41..516.46 rows=20 width=4)
Sort Key: case_id
-> Seq Scan on tbl_implement_records (cost=0.00..515.98 rows=20 width=4)
Filter: ((NOT is_draft) AND (case_id = ANY ('{9259,9258,9257,9256,9255,9254,9253,9250,9249,9243,9242,9245,9240,9247,9246,9244,9241,9239,9237,9238}'::integer[])))