In PHP, which is quicker; using include(\'somefile.php\')
or querying a MySQL database with a simple SELECT
query to get the same information?
I recently had this issue. I had some data in mysql that I was querying on every page request. For my data set, it was faster to write a fixed record length file than to use MySQL.
There were a few different factors that made a file faster than MySQL for me:
Bottom line was that I benchmarked it and compared results. For my workload, the file system was faster. I suspect if my data set ever grows, that will change. I'm going to be keeping an eye on performance and I'm ready to change how it works in the future.