Faster AJAX Database Searching

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Faster AJAX Database Searching

Post by icesolid »

I wasn't sure where to post this one, scold me if I am wrong.

I am just wondering if there is any way of making an AJAX database search on every onkeyup, bring up the results faster?
User avatar
php_east
Forum Contributor
Posts: 453
Joined: Sun Feb 22, 2009 1:31 pm
Location: Far Far East.

Re: Faster AJAX Database Searching

Post by php_east »

icesolid wrote:I wasn't sure where to post this one, scold me if I am wrong.

I am just wondering if there is any way of making an AJAX database search on every onkeyup, bring up the results faster?
faster than what i don't know, but i was told google does that in google suggest. works fine.
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Re: Faster AJAX Database Searching

Post by icesolid »

Google does what in Google suggest?
User avatar
php_east
Forum Contributor
Posts: 453
Joined: Sun Feb 22, 2009 1:31 pm
Location: Far Far East.

Re: Faster AJAX Database Searching

Post by php_east »

does what you asks...
icesolid wrote:......making an AJAX database search on every onkeyup.....
icesolid
Forum Regular
Posts: 502
Joined: Mon May 06, 2002 9:36 pm
Location: Buffalo, NY

Re: Faster AJAX Database Searching

Post by icesolid »

I have coded my own AJAX search onkeyup. The problem is the search results come back slowly, I am wondering how I can speed up the retrieval of results.
User avatar
php_east
Forum Contributor
Posts: 453
Joined: Sun Feb 22, 2009 1:31 pm
Location: Far Far East.

Re: Faster AJAX Database Searching

Post by php_east »

well, we cannot do anything much about interconnect speed, so the next best thing is to ensure we don't have to load an entire framework just to access a few db table values, if that is what you are suffering from.

it guess it depends on exactly what search is done, for google, it is just a matter of the popular keywords within the context typed, and that plus the fact they have fast localised servers everywhere makes it relatively fast.

another way is perhaps to load a portion of your db, if not large, onto a hiden frame and search on that frame. that would really be fast.
Mark Baker
Forum Regular
Posts: 710
Joined: Thu Oct 30, 2008 6:24 pm

Re: Faster AJAX Database Searching

Post by Mark Baker »

Rather than searching the database directly, you might consider a Trie search
Post Reply