QUERY PLAN
GroupAggregate (cost=485.17..485.31 rows=5 width=20)
Group Key: project_id
-> Sort (cost=485.17..485.18 rows=5 width=24)
Sort Key: project_id
-> Bitmap Heap Scan on tbl_work_logs (cost=65.72..485.11 rows=5 width=24)
Recheck Cond: (project_id = ANY ('{4139,4059,3956,3849,3919,3882,3917,3883,3898,3745,3538,3301,3105,3049,2831,2851}'::integer[]))
Filter: ((NOT is_draft) AND (scenario_id = 2))
-> Bitmap Index Scan on tbl_work_logs_project_id_idx (cost=0.00..65.72 rows=143 width=0)
Index Cond: (project_id = ANY ('{4139,4059,3956,3849,3919,3882,3917,3883,3898,3745,3538,3301,3105,3049,2831,2851}'::integer[]))