QUERY PLAN
GroupAggregate (cost=744.26..744.32 rows=3 width=21)
Group Key: it.product_type_id, it.name
-> Sort (cost=744.26..744.27 rows=3 width=17)
Sort Key: it.product_type_id, it.name
-> Hash Semi Join (cost=597.66..744.24 rows=3 width=17)
Hash Cond: (it.implement_id = ir.id)
-> Seq Scan on tbl_implement_product_types it (cost=0.00..126.68 rows=7568 width=21)
-> Hash (cost=597.63..597.63 rows=2 width=4)
-> Hash Join (cost=268.33..597.63 rows=2 width=4)
Hash Cond: (ir.case_id = c.id)
-> Seq Scan on tbl_implement_records ir (cost=0.00..312.19 rows=6517 width=8)
Filter: (NOT is_draft)
-> Hash (cost=268.29..268.29 rows=3 width=4)
-> Seq Scan on tbl_cases c (cost=0.00..268.29 rows=3 width=4)
Filter: (project_id = 3880)