QUERY PLAN
Limit (cost=719.93..719.96 rows=10 width=286)
-> Sort (cost=719.93..720.25 rows=127 width=286)
Sort Key: s.is_draft DESC, s.end_at DESC
-> Group (cost=716.24..717.19 rows=127 width=286)
Group Key: s.id
-> Sort (cost=716.24..716.55 rows=127 width=270)
Sort Key: s.id
-> Hash Right Join (cost=531.76..711.80 rows=127 width=270)
Hash Cond: (ccr.work_log_id = s.id)
-> Seq Scan on tbl_work_log_carbon_copy_rels ccr (cost=0.00..144.60 rows=9360 width=4)
-> Hash (cost=530.17..530.17 rows=127 width=270)
-> Hash Right Join (cost=385.60..530.17 rows=127 width=270)
Hash Cond: (rvr.work_log_id = s.id)
-> Seq Scan on tbl_work_log_verify_rels rvr (cost=0.00..123.66 rows=7966 width=4)
-> Hash (cost=384.01..384.01 rows=127 width=270)
-> Bitmap Heap Scan on tbl_work_logs s (cost=5.27..384.01 rows=127 width=270)
Recheck Cond: (client_id = 982)
Filter: (NOT is_draft)
-> Bitmap Index Scan on tbl_work_logs_client_id_idx (cost=0.00..5.24 rows=127 width=0)
Index Cond: (client_id = 982)