Limit (cost=195.06..195.08 rows=10 width=524) |
-> Sort (cost=195.06..195.21 rows=63 width=524) |
Sort Key: s.is_complete, s.end_at DESC, s.created_at DESC |
-> Group (cost=193.07..193.70 rows=63 width=524) |
Group Key: s.id |
-> Sort (cost=193.07..193.22 rows=63 width=520) |
Sort Key: s.id |
-> Hash Right Join (cost=179.04..191.18 rows=63 width=520) |
Hash Cond: (ccr.schedule_id = s.id) |
Filter: (((s.is_public = 1) AND (s.created_by <> 5016)) OR (s.created_by = 5016) OR (ccr.user_id = 5016)) |
-> Seq Scan on tbl_schedule_carbon_copy_rels ccr (cost=0.00..10.45 rows=645 width=8) |
-> Hash (cost=178.23..178.23 rows=65 width=520) |
-> Bitmap Heap Scan on tbl_schedules s (cost=4.79..178.23 rows=65 width=520) |
Recheck Cond: (client_id = 141) |
-> Bitmap Index Scan on tbl_schedules_client_id_idx (cost=0.00..4.77 rows=65 width=0) |
Index Cond: (client_id = 141) |