Re: Drop down suggestions (MySQL speed)

From: The Natural Philosopher <tnp_at_invalid.invalid>
Date: Tue, 16 May 2017 06:26:29 +0100
Message-ID: <ofe2bs$aqc$1_at_dont-email.me>


On 16/05/17 02:05, bit-naughty_at_hotmail.com wrote:
> If I want to have drop down suggestions on a website (like Google
> does), with the actual suggestions coming from a MySQL table - is
> MySQL fast enough to handle such things? Like, if some one types
> "gr", it has to a SELECT FROM table WHERE term = "gr" - is the whole
> thing, reading from disk included n all, fast enough so that the
> suggestions will drop down INSTANTLY when "gr" is typed? Any tips n
> tricks on how to achieve this?
>

[Quoted] well as long as you know IN ADVANCE what you want to drop down, yu can drag it from a table when the whole page is built, send the lot, and use javascript to handle the popup stuff.

To load it on an 'as required' basis using AJAX or similar is not impossible, but may make the page clunky.

SQL is probably fast enough with a small table and small site, but this really is more a javascript/html issues.

When I did it, I found that browser speeds were more a limiting factor, and ended up with huge amounts of 'hidden' data that popped up on demand.

hiding/unhiding a <div> is pretty fast.

>
> Thanks.
>

-- 
“It is hard to imagine a more stupid decision or more dangerous way of
making decisions than by putting those decisions in the hands of people
who pay no price for being wrong.”

Thomas Sowell
Received on Tue May 16 2017 - 07:26:29 CEST

Original text of this message