QUERY PLAN
Unique (cost=69.25..69.32 rows=14 width=4)
-> Sort (cost=69.25..69.28 rows=14 width=4)
Sort Key: c.deduct_points_from
-> Nested Loop (cost=21.82..68.98 rows=14 width=4)
-> Hash Join (cost=21.54..29.38 rows=14 width=4)
Hash Cond: (crd.id = crr.remind_date_id)
-> Seq Scan on tbl_case_remind_dates crd (cost=0.00..5.04 rows=304 width=8)
-> Hash (cost=21.36..21.36 rows=14 width=4)
-> Seq Scan on tbl_case_remind_receivers crr (cost=0.00..21.36 rows=14 width=4)
Filter: (user_id = 1011)
-> Index Scan using tbl_cases_pkey on tbl_cases c (cost=0.29..2.83 rows=1 width=8)
Index Cond: (id = crd.case_id)