On 29 Oct 2008, at 03:17, Richard Schneeman <[EMAIL PROTECTED]
> wrote:
>
> That knocked off about 1000ms, thanks for the help! Is it possible to
> re-arrange the order of your database all together??
>
> When I take out the :order => 'rank desc' my sql call time gets cut in
> half, is there any way to tell RoR to automatically sort my
> definitions
> (in the DB) by rank descending??
>
> I already have this code in my phrase.rb
>
> "has_many :definitions, :order => 'rank DESC'"
>
> but is it possible to have an entire model be automatically ordered
> by a
> specific column inside of the database?? In this case by rank.
Nope. Or rather at the end of the day the database still needs to sort
it. An index on the column you are ordering by usually helps.
Fred.
>
> --
> Posted via http://www.ruby-forum.com/.
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---