force use of proper index when getting feeds
This commit is contained in:
parent
a74b7ab5b8
commit
3df1001811
@ -89,7 +89,8 @@ class FeedFactory < ApplicationController
|
|||||||
# get feeds
|
# get feeds
|
||||||
def get_feeds
|
def get_feeds
|
||||||
# get feed based on conditions
|
# get feed based on conditions
|
||||||
@feeds = Feed.where(:channel_id => @channel.id, :created_at => @date_range)
|
@feeds = Feed.from("feeds FORCE INDEX (index_feeds_on_channel_id_and_created_at)")
|
||||||
|
.where(:channel_id => @channel.id, :created_at => @date_range)
|
||||||
.select(@feed_select_options)
|
.select(@feed_select_options)
|
||||||
.order('created_at desc')
|
.order('created_at desc')
|
||||||
.limit(@limit)
|
.limit(@limit)
|
||||||
|
Loading…
Reference in New Issue
Block a user