QUERY PLAN
GroupAggregate (cost=181.89..182.83 rows=29 width=57)
Group Key: pt.product_type_id, pt.name
-> Sort (cost=181.89..181.96 rows=29 width=26)
Sort Key: pt.product_type_id, pt.name
-> Hash Join (cost=102.61..181.18 rows=29 width=26)
Hash Cond: (pt.project_id = tbl_projects.id)
-> Seq Scan on tbl_project_product_types pt (cost=0.00..69.09 rows=3609 width=30)
-> Hash (cost=102.29..102.29 rows=25 width=4)
-> Bitmap Heap Scan on tbl_projects (cost=4.63..102.29 rows=25 width=4)
Recheck Cond: (client_id = 149)
Filter: (project_status = 3)
-> Bitmap Index Scan on tbl_projects_client_id_idx (cost=0.00..4.62 rows=46 width=0)
Index Cond: (client_id = 149)