Jeffrey L. Taylor wrote in post #959191: > Quoting Marnen Laibow-Koser <li...@ruby-forum.com>: >> Jeffrey L. Taylor wrote in post #958953: >> > How should I index the terms table for maximum speed? >> >> How can we tell you? You neglected to say how you're using that >> table...or is the query below the only one you're interested in? >> > > Correct, this is the one I care about. All others are trivial in terms > of > resources compared to this one. > >> > It doesn't have >> > to be >> > Rails migration doable. >> >> But it will be, since adding indices generally is. >> > > Composite keys are not supported in stock Rails.
Composite *primary keys* are not (but there's a plugin). Composite *indices* are. You can specify multiple columns in add_index. > And I will not switch > DB > servers next week, so having the index creation in portable form is not > a necessity. Never write SQL in Rails unless there's no other way. Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org Sent from my iPhone -- 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 rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.