QUERY PLAN
HashAggregate (cost=408.68..408.78 rows=10 width=4)
Group Key: client.sales_rep
-> Hash Left Join (cost=150.24..407.28 rows=557 width=4)
Hash Cond: (p.client_id = client.id)
-> Hash Join (cost=18.85..274.43 rows=557 width=4)
Hash Cond: (p.id = prr.project_id)
-> Seq Scan on tbl_projects p (cost=0.00..235.34 rows=2934 width=8)
-> Hash (cost=11.89..11.89 rows=557 width=4)
-> Seq Scan on tbl_project_remind_receivers prr (cost=0.00..11.89 rows=557 width=4)
Filter: (user_id = 1001)
-> Hash (cost=106.73..106.73 rows=1973 width=8)
-> Seq Scan on tbl_clients client (cost=0.00..106.73 rows=1973 width=8)