QUERY PLAN
Limit (cost=127.94..127.96 rows=10 width=128)
-> Sort (cost=127.89..128.47 rows=234 width=128)
Sort Key: r.open_from DESC, r.created_at DESC
-> Hash Right Join (cost=48.80..120.98 rows=234 width=128)
Hash Cond: (rvr.rating_id = r.id)
-> Seq Scan on tbl_rating_voters rvr (cost=0.00..72.03 rows=11 width=9)
Filter: (user_id = 1000)
-> Hash (cost=45.87..45.87 rows=234 width=126)
-> Hash Right Join (cost=9.27..45.87 rows=234 width=126)
Hash Cond: (rc.rating_id = r.id)
-> Seq Scan on tbl_rating_candidates rc (cost=0.00..36.56 rows=18 width=4)
Filter: (user_id = 1000)
-> Hash (cost=6.34..6.34 rows=234 width=126)
-> Seq Scan on tbl_ratings r (cost=0.00..6.34 rows=234 width=126)