QUERY PLAN
Unique (cost=197.56..197.60 rows=8 width=4)
-> Sort (cost=197.56..197.58 rows=8 width=4)
Sort Key: s.created_by
-> Nested Loop (cost=0.28..197.44 rows=8 width=4)
-> Seq Scan on tbl_approve_carbon_copy_rels ccr (cost=0.00..139.05 rows=8 width=4)
Filter: (user_id = 1001)
-> Index Scan using tbl_approves_pkey on tbl_approves s (cost=0.28..7.30 rows=1 width=8)
Index Cond: (id = ccr.approve_id)