moose-en-a-gant Posted February 17, 2015 Share Posted February 17, 2015 I'm thinking of creating a text file of a database to be used instead of multiple queries. This idea isn't mine originally, just thought it could be a better option First: Let's say we have a 1000 users What is better: 1) A text file to be accessed 1000 times, being broken up for the parts eg. user, text posted, date, etc... 2) The same data in the database accessed 1000 times but faster search or are they pretty much the same thing? data stored somewhere My concern... so far my thought of action is that every time a page that uses this text file is loaded, the current text file is loaded and then the same text file is updated.Meanwhile, if people write to the file, it can be updated as well while it is being used, I would think I should have at least two, but then I would think that's not enough, this could become a lot... so what plan should I go down? Is this a silly concern? What is the better way to solve this problem of a database being displayed and updated. Seems like an everyday thing. Just wondering the savings from using a text file or just use the database. Link to comment https://forums.phpfreaks.com/topic/294671-how-can-i-ensure-that-a-text-file-being-accessed-and-updated-by-numerous-people-doesnt-become-corrupt/ Share on other sites More sharing options...
scootstah Posted February 17, 2015 Share Posted February 17, 2015 The database is going to perform better by leaps and bounds. After all, that is exactly what it is for. It has mechanisms for optimized queries, caching, indexing, better resource management, etc. Link to comment https://forums.phpfreaks.com/topic/294671-how-can-i-ensure-that-a-text-file-being-accessed-and-updated-by-numerous-people-doesnt-become-corrupt/#findComment-1505925 Share on other sites More sharing options...
moose-en-a-gant Posted February 17, 2015 Author Share Posted February 17, 2015 Okay I'll go with that Until I get more experience and start tracking / observing the resource use for my specific application / page design Thanks Link to comment https://forums.phpfreaks.com/topic/294671-how-can-i-ensure-that-a-text-file-being-accessed-and-updated-by-numerous-people-doesnt-become-corrupt/#findComment-1505929 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.