QUERY PLAN
Unique (cost=177.49..177.53 rows=9 width=4)
-> Sort (cost=177.49..177.51 rows=9 width=4)
Sort Key: s.created_by
-> Nested Loop (cost=0.28..177.35 rows=9 width=4)
-> Seq Scan on tbl_approve_carbon_copy_rels ccr (cost=0.00..114.66 rows=9 width=4)
Filter: (user_id = 1000)
-> Index Scan using tbl_approves_pkey on tbl_approves s (cost=0.28..6.96 rows=1 width=8)
Index Cond: (id = ccr.approve_id)