order newest stories by id, not created_at
same order (most likely) but id has an index on it and created_at will need a full table scan
This commit is contained in:
parent
ea2fa1b177
commit
13de40df34
|
@ -28,7 +28,7 @@ class StoryRepository
|
|||
|
||||
def newest
|
||||
newest = filter_downvoted_and_tags base_scope
|
||||
newest.order("stories.created_at DESC")
|
||||
newest.order("stories.id DESC")
|
||||
end
|
||||
|
||||
def newest_by_user(user)
|
||||
|
|
Loading…
Reference in a new issue