QUERY PLAN
Limit (cost=389.02..389.06 rows=17 width=313)
-> Sort (cost=389.02..389.06 rows=17 width=313)
Sort Key: s.is_draft DESC, s.end_at DESC
-> Group (cost=388.54..388.67 rows=17 width=313)
Group Key: s.id
-> Sort (cost=388.54..388.58 rows=17 width=297)
Sort Key: s.id
-> Hash Right Join (cost=208.72..388.19 rows=17 width=297)
Hash Cond: (ccr.work_log_id = s.id)
-> Seq Scan on tbl_work_log_carbon_copy_rels ccr (cost=0.00..144.40 rows=9340 width=4)
-> Hash (cost=208.51..208.51 rows=17 width=297)
-> Hash Right Join (cost=67.03..208.51 rows=17 width=297)
Hash Cond: (rvr.work_log_id = s.id)
-> Seq Scan on tbl_work_log_verify_rels rvr (cost=0.00..121.00 rows=7800 width=4)
-> Hash (cost=66.82..66.82 rows=17 width=297)
-> Bitmap Heap Scan on tbl_work_logs s (cost=4.42..66.82 rows=17 width=297)
Recheck Cond: (project_id = 3197)
Filter: (NOT is_draft)
-> Bitmap Index Scan on tbl_work_logs_project_id_idx (cost=0.00..4.42 rows=17 width=0)
Index Cond: (project_id = 3197)