Aggregate (cost=540.88..540.89 rows=1 width=8) |
-> Group (cost=540.86..540.86 rows=1 width=4) |
Group Key: c.id |
-> Sort (cost=540.86..540.86 rows=1 width=4) |
Sort Key: c.id |
-> Nested Loop (cost=273.59..540.85 rows=1 width=4) |
-> 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[])) |
-> Index Scan using tbl_clients_pkey on tbl_clients cl (cost=0.28..6.16 rows=1 width=4) |
Index Cond: (id = c.client_id) |
Filter: (sales_rep = 1001) |