QUERY PLAN
GroupAggregate (cost=182.25..183.23 rows=49 width=286)
Group Key: w.scenario_option_id, wso.name
-> Sort (cost=182.25..182.38 rows=49 width=282)
Sort Key: w.scenario_option_id, wso.name
-> Hash Left Join (cost=6.57..180.88 rows=49 width=282)
Hash Cond: (w.scenario_option_id = wso.id)
-> Bitmap Heap Scan on tbl_work_logs w (cost=4.69..178.86 rows=49 width=8)
Recheck Cond: (project_id = 1018)
Filter: ((NOT is_draft) AND (scenario_id = 1))
-> Bitmap Index Scan on tbl_work_logs_project_id_idx (cost=0.00..4.68 rows=52 width=0)
Index Cond: (project_id = 1018)
-> Hash (cost=1.39..1.39 rows=39 width=278)
-> Seq Scan on tbl_work_log_scenario_options wso (cost=0.00..1.39 rows=39 width=278)