Reducing load on MySQL
Posted 08 September 2003 - 06:46 PM
On one webpage I want to have alphabetical links that correspond to companies whose name starts with a certain letter. When the user clicks a letter, all the companies in that letter category are returned...
(all hyperlinks ->) A B C D E ...X Y Z
It seems to me, querying the database on each click might be inefficient if the info is relatively static. Would it make better sense to do the query periodically to keep it up to date? Then store the query results in a text file which is retrieved and ouputted when the user clicks a letter.
Posted 08 September 2003 - 10:54 PM
If you are just returning a name, or something short, I wouldn\'t bother with the text file. MySQL can return queries like that very fast, even if you have several thousand companies per letter.
True, accessing static test files will be faster, but unless you have a ton of info per company, in my opinion, it isn\'t worth the extra effort on your part.
Posted 09 September 2003 - 03:12 AM
Company, address, city, state, area code, phone
I\'m thinking there probably won\'t be more than a few hundred companies whose names all start with the same letter so...probably database is the way to go.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users