QUERY PLAN
Unique (cost=20.63..20.63 rows=1 width=4)
-> Sort (cost=20.63..20.63 rows=1 width=4)
Sort Key: client.sales_rep
-> Nested Loop Left Join (cost=0.56..20.62 rows=1 width=4)
-> Nested Loop (cost=0.28..20.19 rows=1 width=4)
-> Seq Scan on tbl_project_remind_receivers prr (cost=0.00..11.89 rows=1 width=4)
Filter: (user_id = 5295)
-> Index Scan using tbl_projects_pkey on tbl_projects p (cost=0.28..8.30 rows=1 width=8)
Index Cond: (id = prr.project_id)
-> Index Scan using tbl_clients_pkey on tbl_clients client (cost=0.28..0.42 rows=1 width=8)
Index Cond: (id = p.client_id)