QUERY PLAN
GroupAggregate (cost=701.20..701.26 rows=3 width=21)
Group Key: it.product_type_id, it.name
-> Sort (cost=701.20..701.21 rows=3 width=17)
Sort Key: it.product_type_id, it.name
-> Hash Semi Join (cost=563.34..701.18 rows=3 width=17)
Hash Cond: (it.implement_id = ir.id)
-> Seq Scan on tbl_implement_product_types it (cost=0.00..119.13 rows=7113 width=21)
-> Hash (cost=563.32..563.32 rows=2 width=4)
-> Hash Join (cost=254.31..563.32 rows=2 width=4)
Hash Cond: (ir.case_id = c.id)
-> Seq Scan on tbl_implement_records ir (cost=0.00..292.78 rows=6176 width=8)
Filter: (NOT is_draft)
-> Hash (cost=254.28..254.28 rows=3 width=4)
-> Seq Scan on tbl_cases c (cost=0.00..254.28 rows=3 width=4)
Filter: (project_id = 3811)