Search Suggestions using MySQL.

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
mattkenefick
Forum Newbie
Posts: 12
Joined: Tue May 29, 2007 1:01 pm

Search Suggestions using MySQL.

Post by mattkenefick »

I'm actually making this with Flash but the communication link is through AMFPHP which is PHP based.

I run all the queries and stuff through PHP and thats all fine. The only question I have is about Caching MySQL results on the client side and performance.


I have it setup to query a database with LIMIT 10 every 1 second. I'm not sure how thats going to affect performance when, lets say, 5,000 people are using it at once. Can MySQL handle that just fine or am I going to run into some issues?

If I am, are there any suggestions you can offer to help on this one?
Would it be better to just put all the database suggestions into an array and search that? That would only bring up the issue of what happens when theres 10,000+ suggestions (Which there won't be in this case but I'd rather practice the right way then avoid learning it)

Any help? 8O
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Post by califdon »

You haven't given us much to go on. I have no idea what you mean by "database suggestions." Or what you mean by "LIMIT 10 every 1 second." Show us your SQL query(ies). How are you regulating the "1 second" part of it? How big are your tables? In general, your performance will be determined mostly by the server it's on, not by your queries.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Post by s.dot »

5,000 queries per second will effect performance if a single query takes longer than .005 seconds. What you should try to do is set up a central script that will update it for everyone. That would be 1 query per second instead of 5000 queries per second.
Post Reply