QUERY PLAN
Unique (cost=293.78..293.98 rows=40 width=4)
-> Sort (cost=293.78..293.88 rows=40 width=4)
Sort Key: s.created_by
-> Nested Loop (cost=0.29..292.71 rows=40 width=4)
-> Seq Scan on tbl_schedule_carbon_copy_rels ccr (cost=0.00..12.61 rows=40 width=4)
Filter: (user_id = 1000)
-> Index Scan using tbl_schedules_pkey on tbl_schedules s (cost=0.29..7.00 rows=1 width=8)
Index Cond: (id = ccr.schedule_id)