QUERY PLAN
GroupAggregate (cost=516.45..516.80 rows=20 width=12)
Group Key: case_id
-> Sort (cost=516.45..516.50 rows=20 width=4)
Sort Key: case_id
-> Seq Scan on tbl_implement_records (cost=0.00..516.01 rows=20 width=4)
Filter: ((NOT is_draft) AND (case_id = ANY ('{9256,9255,9077,9020,9002,8939,8679,8623,8548,8523,8101,7722,6934,6918,6917,6888,6887,6882,6881,6820}'::integer[])))