| Limit (cost=129.56..129.59 rows=10 width=523) |
| -> Sort (cost=129.56..129.65 rows=35 width=523) |
| Sort Key: s.is_complete, s.end_at DESC, s.created_at DESC |
| -> Group (cost=128.46..128.81 rows=35 width=523) |
| Group Key: s.id |
| -> Sort (cost=128.46..128.54 rows=35 width=519) |
| Sort Key: s.id |
| -> Hash Right Join (cost=114.86..127.56 rows=35 width=519) |
| Hash Cond: (ccr.schedule_id = s.id) |
| Filter: (((s.is_public = 1) AND (s.created_by <> 1000)) OR (s.created_by = 1000) OR (ccr.user_id = 1000)) |
| -> Seq Scan on tbl_schedule_carbon_copy_rels ccr (cost=0.00..10.89 rows=689 width=8) |
| -> Hash (cost=114.41..114.41 rows=36 width=519) |
| -> Bitmap Heap Scan on tbl_schedules s (cost=4.56..114.41 rows=36 width=519) |
| Recheck Cond: (client_id = 2125) |
| -> Bitmap Index Scan on tbl_schedules_client_id_idx (cost=0.00..4.55 rows=36 width=0) |
| Index Cond: (client_id = 2125) |