hi, how is the performance of the autocomplete fields with a very high number of items ? for example how does autocomplete for user nick work with a database with 500''000/1''000''000 users? -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
nick wrote:> hi, how is the performance of the autocomplete fields with a very high > number of items ? > for example how does autocomplete for user nick work with a database > with 500''000/1''000''000 users?anyone? -- 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 19, 2007, at 1:56 PM, nick wrote:> > nick wrote: >> hi, how is the performance of the autocomplete fields with a very >> high >> number of items ? >> for example how does autocomplete for user nick work with a database >> with 500''000/1''000''000 users? > > anyone? >I guess that depends on the size of each record, the type of database you use and what indexes you have set. But in general autocomplete uses a LIKE query which is definitely slower on a lot of records. Really the only way you are going to know is to make sonme benchmarks. Implement a simple autocomplete and try it against a db with 1Mil rows. Cheers- -- Ezra Zygmuntowicz -- Lead Rails Evangelist -- ez-NLltGlunAUd/unjJdyJNww@public.gmane.org -- Engine Yard, Serious Rails Hosting -- (866) 518-YARD (9273) --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
This isn''t a Rails question, more a database one. If you have an index on the field you''re searching, it will be much faster than if not. Also look into fulltext indexes if using MySQL. ed On 2/19/07, nick <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > nick wrote: > > hi, how is the performance of the autocomplete fields with a very high > > number of items ? > > for example how does autocomplete for user nick work with a database > > with 500''000/1''000''000 users? > > anyone? > > -- > 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Feb 19, 2007, at 10:56 PM, nick wrote:> > nick wrote: >> hi, how is the performance of the autocomplete fields with a very >> high >> number of items ? >> for example how does autocomplete for user nick work with a database >> with 500''000/1''000''000 users? > > anyone?It depends on the query. Remember that you can write a custom method that responds to autocompletion, so the efficiency of autocompletion will become the efficiency of that method. If you base the query in LIKE perhaps performance (of the query) is poor, if you use ferret instead it will be surely better. You see, the point is not autocompletion itself, but the action behind it. -- fxn --~--~---------~--~----~------------~-------~--~----~ 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-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---