Performance and autocomplete

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?

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?

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 Z.
– Lead Rails Evangelist
[email protected]
– Engine Y., Serious Rails Hosting
– (866) 518-YARD (9273)

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 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