QUERY PLAN
HashAggregate (cost=320.60..320.91 rows=31 width=4)
Group Key: c.deduct_points_from
-> Hash Join (cost=29.38..319.99 rows=244 width=4)
Hash Cond: (c.id = crd.case_id)
-> Seq Scan on tbl_cases c (cost=0.00..257.31 rows=8231 width=8)
-> Hash (cost=26.33..26.33 rows=244 width=4)
-> Hash Join (cost=7.74..26.33 rows=244 width=4)
Hash Cond: (crr.remind_date_id = crd.id)
-> Seq Scan on tbl_case_remind_receivers crr (cost=0.00..17.94 rows=244 width=4)
Filter: (user_id = 1001)
-> Hash (cost=4.55..4.55 rows=255 width=8)
-> Seq Scan on tbl_case_remind_dates crd (cost=0.00..4.55 rows=255 width=8)