QUERY PLAN
HashAggregate (cost=310.59..310.90 rows=31 width=4)
Group Key: c.deduct_points_from
-> Hash Join (cost=26.35..310.02 rows=226 width=4)
Hash Cond: (c.id = crd.case_id)
-> Seq Scan on tbl_cases c (cost=0.00..251.30 rows=8030 width=8)
-> Hash (cost=23.52..23.52 rows=226 width=4)
-> Hash Join (cost=7.22..23.52 rows=226 width=4)
Hash Cond: (crr.remind_date_id = crd.id)
-> Seq Scan on tbl_case_remind_receivers crr (cost=0.00..15.70 rows=226 width=4)
Filter: (user_id = 1001)
-> Hash (cost=4.32..4.32 rows=232 width=8)
-> Seq Scan on tbl_case_remind_dates crd (cost=0.00..4.32 rows=232 width=8)