QUERY PLAN
HashAggregate (cost=336.44..336.75 rows=31 width=4)
Group Key: c.deduct_points_from
-> Hash Join (cost=34.13..335.79 rows=259 width=4)
Hash Cond: (c.id = crd.case_id)
-> Seq Scan on tbl_cases c (cost=0.00..267.14 rows=8514 width=8)
-> Hash (cost=30.89..30.89 rows=259 width=4)
-> Hash Join (cost=8.84..30.89 rows=259 width=4)
Hash Cond: (crr.remind_date_id = crd.id)
-> Seq Scan on tbl_case_remind_receivers crr (cost=0.00..21.36 rows=259 width=4)
Filter: (user_id = 1001)
-> Hash (cost=5.04..5.04 rows=304 width=8)
-> Seq Scan on tbl_case_remind_dates crd (cost=0.00..5.04 rows=304 width=8)