Lets just say for example if I had a MySQL table and inside it it had 500,000 records each with a unique 16 digit number. Would a PHP script (or the server to be more precise) struggle within finding a specififc number and would it be slow?
Also what if for example the table held over a million records... any performance issues?
Comments
The Royal Ram
The Royal Ram
What you need to watch for is the amount of times you access the table. If you have too many read/writes going on all the time, then you'll run into load problems.
Webmaster-Talk.com
Chroder.com
The read part simply finds the record and the write just updates it...
The Royal Ram
When you start looking at insane amounts of traffic (like Google or Yahoo, or even "smaller" sites like Digg), you need to start looking into how to split up the load and decreasing the amount of work you need to do (using slave servers, caching etc).
You probably won't need to worry about server load with working with 500,000 records and running simple find/update queries. If multiple users are going to be requesting the same kind of record (ie. the script is trying to fetch and update a record at the same time as another user), it's smart to keep the updates for later. Perhaps write a script that logs the updates to a file, and uses a cron job to update the database every hour.
There's all sorts of factors to look at
Webmaster-Talk.com
Chroder.com
Thanks
The Royal Ram
The Royal Ram