Flame_N Posted September 13, 2007 Share Posted September 13, 2007 Hi to all again, It's pretty simple. I have a database table that rarely changes it's values. Would it be faster to insert the variables from that table into a file (and include that file into the PHP file that needs the value) or just query the database when needed? I can run a script once I need to change the values and the script can write them to the file that is included in the PHP file that needs them. If you don't know the answer can you tell me how I can test how much time a PHP script needs to run... can I find what time it is in a desired moment in the script in milliseconds or something? Thank you all in advance Quote Link to comment https://forums.phpfreaks.com/topic/69212-mysql-query-or-include-variables-from-file-which-is-faster/ Share on other sites More sharing options...
DyslexicDog Posted September 13, 2007 Share Posted September 13, 2007 Well I would look at it from as a conformity issue. Why add more disk reads and extra code? If you are already using the same database for other things there's no sense in adding extra failure points. You could also index the information in the database and speed things up. Quote Link to comment https://forums.phpfreaks.com/topic/69212-mysql-query-or-include-variables-from-file-which-is-faster/#findComment-347850 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.