Hello for one of my models photos I have:
default_scope :order => \'photos.created_at DESC, photos.version DESC\'
Given that I\'m ordering b
One trick that may be helpful: in typical MySql/ActiveRecord models, you will have id
as a numeric primary key (hence implicitly indexed), which should be in the same order of created_at
- which means you could order by id
instead and get the fast performance, without the write cost for an extra index.