QUERY PLAN
GroupAggregate (cost=775.39..775.45 rows=3 width=21)
Group Key: it.product_type_id, it.name
-> Sort (cost=775.39..775.39 rows=3 width=17)
Sort Key: it.product_type_id, it.name
-> Hash Semi Join (cost=622.54..775.36 rows=3 width=17)
Hash Cond: (it.implement_id = ir.id)
-> Seq Scan on tbl_implement_product_types it (cost=0.00..132.04 rows=7904 width=21)
-> Hash (cost=622.52..622.52 rows=2 width=4)
-> Hash Join (cost=277.93..622.52 rows=2 width=4)
Hash Cond: (ir.case_id = c.id)
-> Seq Scan on tbl_implement_records ir (cost=0.00..326.79 rows=6777 width=8)
Filter: (NOT is_draft)
-> Hash (cost=277.89..277.89 rows=3 width=4)
-> Seq Scan on tbl_cases c (cost=0.00..277.89 rows=3 width=4)
Filter: (project_id = 3957)