Anim9or Posted December 18, 2009 Share Posted December 18, 2009 Hi, me again Sorry to bother you with a fairly trivial question but I have a website that's very reliant on loading dozens of variables from a txt document into an array. It is starting to run too slow. I was just wondering if it would be quicker to use MySQL. Until now I have been avoiding it but if it will in fact save time to load values from a database instead of text file, I will. Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/185657-which-is-faster/ Share on other sites More sharing options...
k0z Posted December 18, 2009 Share Posted December 18, 2009 It really depends on the specs of the sql server, the strain already on the sql server, etc. Generally, converting resource intensive sql queries into being handled by php/text files helps greatly, but the contrary, not necessarily.. It also depends on the size of the query you wish to create, E.G. if you plan to use mysql's RAND() function, create a virtual table, etc. Also depends on the frequency of the query, and how resource intensive it is. Its worth converting.. but this is one of those cases where you simply need to test it to be able to know the output. Quote Link to comment https://forums.phpfreaks.com/topic/185657-which-is-faster/#findComment-980321 Share on other sites More sharing options...
mrMarcus Posted December 18, 2009 Share Posted December 18, 2009 i've always opted for for mysql over files .. setup an index within a table to speed things up even further. Quote Link to comment https://forums.phpfreaks.com/topic/185657-which-is-faster/#findComment-980322 Share on other sites More sharing options...
salathe Posted December 19, 2009 Share Posted December 19, 2009 I was just wondering if it would be quicker to use MySQL. The short answer is, probably not. The slightly longer one is, it depends entirely how you use it (the files, MySQL). Quote Link to comment https://forums.phpfreaks.com/topic/185657-which-is-faster/#findComment-980338 Share on other sites More sharing options...
Anim9or Posted December 21, 2009 Author Share Posted December 21, 2009 Thanks, I guess I'll stay with files for now, not point in learning a new system unless it's much faster. maybe when I get to user accounts... Quote Link to comment https://forums.phpfreaks.com/topic/185657-which-is-faster/#findComment-981852 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.