|
Of options, filesystem will always be better than a dbms. But, you are indicating a lookup style functionality (key => value pairs), so this to me warrants the use of a db. If you had a file for each option available without the need for a parse and store, then the filesystem will outperform for sure. But when you need to lookup something, search, limit, etc, than the DB is typically a better option.
Are you issuing thousands of queries due to the traffic itself, or is it due to the script executing excess queries? If its the latter, you should look at why its doing this. Set the goal to 1 query per script, and run from there. I have yet to be able to write a piece of software with only 1 query per script load in PHP, but I have managed to bring down the queries in a fully functional application to 3. 3 per load is pretty good; I personally wouldn't be too worried until you are seeing in the 20ish per page load (IMO its still too high, but I wouldn't be concerned). Also note that queries can be limited to the number of queries issued per hour per user. I don't see it set very often, but I recall seeing it once set at 20,000/h.
|