QUERY PLAN
HashAggregate (cost=304.86..305.17 rows=31 width=4)
Group Key: c.deduct_points_from
-> Hash Join (cost=25.21..304.33 rows=214 width=4)
Hash Cond: (c.id = crd.case_id)
-> Seq Scan on tbl_cases c (cost=0.00..247.26 rows=7926 width=8)
-> Hash (cost=22.53..22.53 rows=214 width=4)
-> Hash Join (cost=6.88..22.53 rows=214 width=4)
Hash Cond: (crr.remind_date_id = crd.id)
-> Seq Scan on tbl_case_remind_receivers crr (cost=0.00..15.08 rows=214 width=4)
Filter: (user_id = 1001)
-> Hash (cost=4.17..4.17 rows=217 width=8)
-> Seq Scan on tbl_case_remind_dates crd (cost=0.00..4.17 rows=217 width=8)