QUERY PLAN
GroupAggregate (cost=854.10..854.49 rows=14 width=20)
Group Key: client_id
-> Sort (cost=854.10..854.14 rows=14 width=24)
Sort Key: client_id
-> Bitmap Heap Scan on tbl_work_logs (cost=45.60..853.84 rows=14 width=24)
Recheck Cond: (client_id = ANY ('{399,2120,1283,39,146,1637,1158,344,574,1958}'::integer[]))
Filter: ((NOT is_draft) AND (scenario_id = 2))
-> Bitmap Index Scan on tbl_work_logs_client_id_idx (cost=0.00..45.60 rows=358 width=0)
Index Cond: (client_id = ANY ('{399,2120,1283,39,146,1637,1158,344,574,1958}'::integer[]))