QUERY PLAN
Unique (cost=20.38..20.38 rows=1 width=4)
-> Sort (cost=20.38..20.38 rows=1 width=4)
Sort Key: s.created_by
-> Nested Loop (cost=0.29..20.37 rows=1 width=4)
-> Seq Scan on tbl_schedule_carbon_copy_rels ccr (cost=0.00..12.06 rows=1 width=4)
Filter: (user_id = 1000)
-> Index Scan using tbl_schedules_pkey on tbl_schedules s (cost=0.29..8.30 rows=1 width=8)
Index Cond: (id = ccr.schedule_id)