Aggregate (cost=534.27..534.28 rows=1 width=8) |
-> Group (cost=534.25..534.26 rows=1 width=4) |
Group Key: c.id |
-> Sort (cost=534.25..534.26 rows=1 width=4) |
Sort Key: c.id |
-> Hash Join (cost=359.34..534.24 rows=1 width=4) |
Hash Cond: (c.client_id = cl.id) |
-> Hash Right Join (cost=273.32..448.18 rows=15 width=8) |
Hash Cond: (ca.case_id = c.id) |
-> Seq Scan on tbl_case_assignments ca (cost=0.00..154.92 rows=7592 width=4) |
-> Hash (cost=273.13..273.13 rows=15 width=8) |
-> Seq Scan on tbl_cases c (cost=0.00..273.13 rows=15 width=8) |
Filter: (case_status = ANY ('{1,2,3,4}'::integer[])) |
-> Hash (cost=85.34..85.34 rows=55 width=4) |
-> Bitmap Heap Scan on tbl_clients cl (cost=4.70..85.34 rows=55 width=4) |
Recheck Cond: (sales_rep = 1001) |
-> Bitmap Index Scan on tbl_clients_sales_rep_idx (cost=0.00..4.69 rows=55 width=0) |
Index Cond: (sales_rep = 1001) |