QUERY PLAN
HashAggregate (cost=41.15..42.30 rows=115 width=286)
Group Key: it.product_type_id, it.name
-> Hash Semi Join (cost=26.10..40.29 rows=115 width=282)
Hash Cond: (it.implement_id = ir.id)
-> Seq Scan on tbl_implement_product_types it (cost=0.00..12.30 rows=230 width=286)
-> Hash (cost=26.09..26.09 rows=1 width=4)
-> Hash Join (cost=13.26..26.09 rows=1 width=4)
Hash Cond: (ir.case_id = c.id)
-> Seq Scan on tbl_implement_records ir (cost=0.00..12.50 rows=125 width=8)
Filter: (NOT is_draft)
-> Hash (cost=13.25..13.25 rows=1 width=4)
-> Seq Scan on tbl_cases c (cost=0.00..13.25 rows=1 width=4)
Filter: (project_id = 1)