QUERY PLAN
GroupAggregate (cost=809.02..809.08 rows=3 width=21)
Group Key: it.product_type_id, it.name
-> Sort (cost=809.02..809.03 rows=3 width=17)
Sort Key: it.product_type_id, it.name
-> Hash Semi Join (cost=647.21..808.99 rows=3 width=17)
Hash Cond: (it.implement_id = ir.id)
-> Seq Scan on tbl_implement_product_types it (cost=0.00..139.76 rows=8376 width=21)
-> Hash (cost=647.19..647.19 rows=2 width=4)
-> Hash Join (cost=288.46..647.19 rows=2 width=4)
Hash Cond: (ir.case_id = c.id)
-> Seq Scan on tbl_implement_records ir (cost=0.00..340.28 rows=7023 width=8)
Filter: (NOT is_draft)
-> Hash (cost=288.43..288.43 rows=3 width=4)
-> Seq Scan on tbl_cases c (cost=0.00..288.43 rows=3 width=4)
Filter: (project_id = 3854)