QUERY PLAN
Unique (cost=177.74..177.78 rows=9 width=4)
-> Sort (cost=177.74..177.76 rows=9 width=4)
Sort Key: s.created_by
-> Nested Loop (cost=0.28..177.60 rows=9 width=4)
-> Seq Scan on tbl_approve_carbon_copy_rels ccr (cost=0.00..110.91 rows=9 width=4)
Filter: (user_id = 1001)
-> Index Scan using tbl_approves_pkey on tbl_approves s (cost=0.28..7.41 rows=1 width=8)
Index Cond: (id = ccr.approve_id)