QUERY PLAN
GroupAggregate (cost=272.44..274.02 rows=79 width=32)
Group Key: w.scenario_option_id, wso.name
-> Sort (cost=272.44..272.63 rows=79 width=24)
Sort Key: w.scenario_option_id, wso.name
-> Hash Left Join (cost=6.80..269.95 rows=79 width=24)
Hash Cond: (w.scenario_option_id = wso.id)
-> Bitmap Heap Scan on tbl_work_logs w (cost=4.92..267.84 rows=79 width=8)
Recheck Cond: (client_id = 2128)
Filter: ((NOT is_draft) AND (scenario_id = 1))
-> Bitmap Index Scan on tbl_work_logs_client_id_idx (cost=0.00..4.91 rows=82 width=0)
Index Cond: (client_id = 2128)
-> Hash (cost=1.39..1.39 rows=39 width=20)
-> Seq Scan on tbl_work_log_scenario_options wso (cost=0.00..1.39 rows=39 width=20)