QUERY PLAN
HashAggregate (cost=36.30..41.55 rows=350 width=214)
Group Key: ci.id
-> Hash Left Join (cost=17.10..31.92 rows=350 width=214)
Hash Cond: (ci.id = c.client_industry)
-> Seq Scan on tbl_client_industries ci (cost=0.00..13.50 rows=350 width=150)
-> Hash (cost=17.09..17.09 rows=1 width=68)
-> Nested Loop (cost=0.28..17.09 rows=1 width=68)
-> Index Scan using tbl_projects_created_by_idx on tbl_projects p (cost=0.14..8.17 rows=1 width=68)
Index Cond: (created_by = 5495)
Filter: ((bargain_date >= '2026-01-01'::date) AND (bargain_date <= '2026-12-31'::date) AND (bargain_date >= '2026-01-01'::date) AND (bargain_date < '2027-01-01 00:00:00'::timestamp without time zone))
-> Index Scan using tbl_clients_pkey on tbl_clients c (cost=0.14..8.15 rows=1 width=8)
Index Cond: (id = p.client_id)