QUERY PLAN
GroupAggregate (cost=26.06..26.08 rows=1 width=290)
Group Key: it.product_type_id, it.name
-> Sort (cost=26.06..26.07 rows=1 width=282)
Sort Key: it.product_type_id, it.name
-> Hash Join (cost=13.14..26.05 rows=1 width=282)
Hash Cond: (it.implement_id = tbl_implement_records.id)
-> Seq Scan on tbl_implement_product_types it (cost=0.00..12.30 rows=230 width=286)
-> Hash (cost=13.12..13.12 rows=1 width=4)
-> Seq Scan on tbl_implement_records (cost=0.00..13.12 rows=1 width=4)
Filter: ((NOT is_draft) AND (client_id = 1))