Azaz Posted July 28, 2010 Share Posted July 28, 2010 I was wondering if this is faster or better performance. Each time a user submit's a post on my forum I will make it +1 the .txt file on my main server directory called test.txt, then I can just call that on my main forum index to show the amount of total posts our board has, instead of using mysql queries to sum all of it from the tables... good idea? or am i retarded? Link to comment https://forums.phpfreaks.com/topic/209082-is-this-a-good-idea/ Share on other sites More sharing options...
Wolphie Posted July 28, 2010 Share Posted July 28, 2010 It's better to just use MySQL for this kind of thing. It's no quicker writing to a text file. It also makes using this data far easier when it's all together and can be easily queried. Link to comment https://forums.phpfreaks.com/topic/209082-is-this-a-good-idea/#findComment-1092017 Share on other sites More sharing options...
Azaz Posted July 28, 2010 Author Share Posted July 28, 2010 It's better to just use MySQL for this kind of thing. It's no quicker writing to a text file. It also makes using this data far easier when it's all together and can be easily queried. Yea but are you sure cause IW ould have to sum 3tables and sum the posts value for each one, are u sure Link to comment https://forums.phpfreaks.com/topic/209082-is-this-a-good-idea/#findComment-1092337 Share on other sites More sharing options...
radar Posted July 28, 2010 Share Posted July 28, 2010 why would you have to query 3 tables for that? SELECT count(*) FROM posts done Link to comment https://forums.phpfreaks.com/topic/209082-is-this-a-good-idea/#findComment-1092342 Share on other sites More sharing options...
Azaz Posted July 28, 2010 Author Share Posted July 28, 2010 why would you have to query 3 tables for that? SELECT count(*) FROM posts done Well yea but what if I have 300,000 posts and selecting all those??? take forever? Link to comment https://forums.phpfreaks.com/topic/209082-is-this-a-good-idea/#findComment-1092347 Share on other sites More sharing options...
radar Posted July 28, 2010 Share Posted July 28, 2010 you aren't really selecting them though, you are selecting the count. Link to comment https://forums.phpfreaks.com/topic/209082-is-this-a-good-idea/#findComment-1092348 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.