QUERY PLAN
Limit (cost=712.17..712.20 rows=10 width=313)
-> Sort (cost=712.17..712.50 rows=129 width=313)
Sort Key: s.is_draft DESC, s.end_at DESC
-> Group (cost=708.42..709.39 rows=129 width=313)
Group Key: s.id
-> Sort (cost=708.42..708.74 rows=129 width=297)
Sort Key: s.id
-> Hash Right Join (cost=524.19..703.90 rows=129 width=297)
Hash Cond: (ccr.work_log_id = s.id)
-> Seq Scan on tbl_work_log_carbon_copy_rels ccr (cost=0.00..144.34 rows=9334 width=4)
-> Hash (cost=522.58..522.58 rows=129 width=297)
-> Hash Right Join (cost=385.86..522.58 rows=129 width=297)
Hash Cond: (rvr.work_log_id = s.id)
-> Seq Scan on tbl_work_log_verify_rels rvr (cost=0.00..116.82 rows=7582 width=4)
-> Hash (cost=384.25..384.25 rows=129 width=297)
-> Bitmap Heap Scan on tbl_work_logs s (cost=5.29..384.25 rows=129 width=297)
Recheck Cond: (client_id = 982)
Filter: (NOT is_draft)
-> Bitmap Index Scan on tbl_work_logs_client_id_idx (cost=0.00..5.26 rows=129 width=0)
Index Cond: (client_id = 982)