QUERY PLAN
GroupAggregate (cost=421.77..421.88 rows=4 width=20)
Group Key: project_id
-> Sort (cost=421.77..421.78 rows=4 width=24)
Sort Key: project_id
-> Bitmap Heap Scan on tbl_work_logs (cost=82.55..421.73 rows=4 width=24)
Recheck Cond: (project_id = ANY ('{4174,1018,4184,4186,4185,4182,4183,4181,4173,4179,4079,4170,4175,4155,4172,4171,4151,4169,4168,4144}'::integer[]))
Filter: ((NOT is_draft) AND (scenario_id = 2))
-> Bitmap Index Scan on tbl_work_logs_project_end_at_idx (cost=0.00..82.55 rows=110 width=0)
Index Cond: (project_id = ANY ('{4174,1018,4184,4186,4185,4182,4183,4181,4173,4179,4079,4170,4175,4155,4172,4171,4151,4169,4168,4144}'::integer[]))