| Aggregate (cost=322.07..322.08 rows=1 width=8) |
| -> Group (cost=322.04..322.05 rows=2 width=479) |
| Group Key: s.id |
| -> Sort (cost=322.04..322.04 rows=2 width=4) |
| Sort Key: s.id |
| -> Hash Right Join (cost=309.34..322.03 rows=2 width=4) |
| Hash Cond: (ccr.schedule_id = s.id) |
| Filter: ((((s.is_public = 1) AND (s.created_by <> 1001)) OR (s.created_by = 1001) OR (ccr.user_id = 1001)) AND ((s.created_by = ANY ('{1000,1001,1004,1005,1011,1013,1015,1022,1023,5016,5064,5085,5087,5248,5250,5252,5295,5300,5311,5332,5360,5446,5461,5476}'::integer[])) OR (ccr.user_id = 1001))) |
| -> Seq Scan on tbl_schedule_carbon_copy_rels ccr (cost=0.00..10.88 rows=688 width=8) |
| -> Hash (cost=309.30..309.30 rows=3 width=16) |
| -> Bitmap Heap Scan on tbl_schedules s (cost=5.43..309.30 rows=3 width=16) |
| Recheck Cond: (created_by = 1001) |
| Filter: ((set_top_at IS NULL) AND (NOT is_complete) AND (end_at <= now())) |
| -> Bitmap Index Scan on tbl_schedules_created_by_idx (cost=0.00..5.43 rows=153 width=0) |
| Index Cond: (created_by = 1001) |