QUERY PLAN
Limit (cost=511.48..511.53 rows=20 width=286)
-> Sort (cost=511.48..511.61 rows=52 width=286)
Sort Key: s.is_draft DESC, s.end_at DESC
-> Group (cost=509.71..510.10 rows=52 width=286)
Group Key: s.id
-> Sort (cost=509.71..509.84 rows=52 width=270)
Sort Key: s.id
-> Hash Right Join (cost=328.39..508.23 rows=52 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=327.74..327.74 rows=52 width=270)
-> Hash Right Join (cost=183.17..327.74 rows=52 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=182.52..182.52 rows=52 width=270)
-> Bitmap Heap Scan on tbl_work_logs s (cost=4.70..182.52 rows=52 width=270)
Recheck Cond: (project_id = 1018)
Filter: (NOT is_draft)
-> Bitmap Index Scan on tbl_work_logs_project_id_idx (cost=0.00..4.69 rows=53 width=0)
Index Cond: (project_id = 1018)