QUERY PLAN
HashAggregate (cost=341.50..341.60 rows=10 width=4)
Group Key: client.sales_rep
-> Hash Left Join (cost=150.33..340.07 rows=572 width=4)
Hash Cond: (p.client_id = client.id)
-> Hash Join (cost=19.41..207.65 rows=572 width=4)
Hash Cond: (p.id = prr.project_id)
-> Seq Scan on tbl_projects p (cost=0.00..167.68 rows=2968 width=8)
-> Hash (cost=12.26..12.26 rows=572 width=4)
-> Seq Scan on tbl_project_remind_receivers prr (cost=0.00..12.26 rows=572 width=4)
Filter: (user_id = 1001)
-> Hash (cost=106.52..106.52 rows=1952 width=8)
-> Seq Scan on tbl_clients client (cost=0.00..106.52 rows=1952 width=8)