QUERY PLAN
GroupAggregate (cost=753.79..753.85 rows=3 width=21)
Group Key: it.product_type_id, it.name
-> Sort (cost=753.79..753.79 rows=3 width=17)
Sort Key: it.product_type_id, it.name
-> Hash Semi Join (cost=604.77..753.76 rows=3 width=17)
Hash Cond: (it.implement_id = ir.id)
-> Seq Scan on tbl_implement_product_types it (cost=0.00..128.80 rows=7680 width=21)
-> Hash (cost=604.74..604.74 rows=2 width=4)
-> Hash Join (cost=271.41..604.74 rows=2 width=4)
Hash Cond: (ir.case_id = c.id)
-> Seq Scan on tbl_implement_records ir (cost=0.00..316.00 rows=6598 width=8)
Filter: (NOT is_draft)
-> Hash (cost=271.38..271.38 rows=3 width=4)
-> Seq Scan on tbl_cases c (cost=0.00..271.38 rows=3 width=4)
Filter: (project_id = 3813)