QUERY PLAN
GroupAggregate (cost=741.55..741.61 rows=3 width=21)
Group Key: it.product_type_id, it.name
-> Sort (cost=741.55..741.56 rows=3 width=17)
Sort Key: it.product_type_id, it.name
-> Hash Semi Join (cost=595.24..741.53 rows=3 width=17)
Hash Cond: (it.implement_id = ir.id)
-> Seq Scan on tbl_implement_product_types it (cost=0.00..126.45 rows=7545 width=21)
-> Hash (cost=595.21..595.21 rows=2 width=4)
-> Hash Join (cost=267.11..595.21 rows=2 width=4)
Hash Cond: (ir.case_id = c.id)
-> Seq Scan on tbl_implement_records ir (cost=0.00..311.03 rows=6499 width=8)
Filter: (NOT is_draft)
-> Hash (cost=267.07..267.07 rows=3 width=4)
-> Seq Scan on tbl_cases c (cost=0.00..267.07 rows=3 width=4)
Filter: (project_id = 3927)