QUERY PLAN
GroupAggregate (cost=496.74..496.90 rows=8 width=25)
Group Key: it.product_type_id, it.name
-> Sort (cost=496.74..496.76 rows=8 width=17)
Sort Key: it.product_type_id, it.name
-> Hash Join (cost=343.82..496.62 rows=8 width=17)
Hash Cond: (it.implement_id = tbl_implement_records.id)
-> Seq Scan on tbl_implement_product_types it (cost=0.00..132.04 rows=7904 width=21)
-> Hash (cost=343.74..343.74 rows=7 width=4)
-> Seq Scan on tbl_implement_records (cost=0.00..343.74 rows=7 width=4)
Filter: ((NOT is_draft) AND (client_id = 1661))