Aggregate (cost=567.86..567.87 rows=1 width=8) |
-> Group (cost=567.84..567.84 rows=1 width=4) |
Group Key: c.id |
-> Sort (cost=567.84..567.84 rows=1 width=4) |
Sort Key: c.id |
-> Hash Join (cost=381.14..567.83 rows=1 width=4) |
Hash Cond: (c.client_id = cl.id) |
-> Hash Right Join (cost=293.38..480.02 rows=18 width=8) |
Hash Cond: (ca.case_id = c.id) |
-> Seq Scan on tbl_case_assignments ca (cost=0.00..165.29 rows=8129 width=4) |
-> Hash (cost=293.15..293.15 rows=18 width=8) |
-> Seq Scan on tbl_cases c (cost=0.00..293.15 rows=18 width=8) |
Filter: (case_status = ANY ('{1,2,3,4}'::integer[])) |
-> Hash (cost=87.03..87.03 rows=58 width=4) |
-> Bitmap Heap Scan on tbl_clients cl (cost=4.73..87.03 rows=58 width=4) |
Recheck Cond: (sales_rep = 1001) |
-> Bitmap Index Scan on tbl_clients_sales_rep_idx (cost=0.00..4.71 rows=58 width=0) |
Index Cond: (sales_rep = 1001) |