QUERY PLAN
GroupAggregate (cost=519.36..520.64 rows=64 width=25)
Group Key: it.product_type_id, it.name
-> Sort (cost=519.36..519.52 rows=64 width=17)
Sort Key: it.product_type_id, it.name
-> Hash Join (cost=358.55..517.44 rows=64 width=17)
Hash Cond: (it.implement_id = tbl_implement_records.id)
-> Seq Scan on tbl_implement_product_types it (cost=0.00..137.28 rows=8228 width=21)
-> Hash (cost=357.86..357.86 rows=55 width=4)
-> Seq Scan on tbl_implement_records (cost=0.00..357.86 rows=55 width=4)
Filter: ((NOT is_draft) AND (client_id = 982))