Asheeown Posted November 25, 2009 Share Posted November 25, 2009 I'm making a program that is going to be communicating with mysql a lot. For all of it's directions actually. It's going to constantly run select queries to check for pending commands and constantly run insert queries to write other data to other tables. There will be lots of these running at once. So lets say 100 people are using it at the time and they average 10 queries a second. How do I lower my bandwidth usage? Should I keep an open connection for each user? Is there a way to keep a query open so it doesn't need to execute every time but basically post changes? Just looking for any suggestions on lowering my usage. If you don't think that many queries is a problem that's fine with me, I'd like to hear that too Quote Link to comment https://forums.phpfreaks.com/topic/182869-lots-of-queries-optimization-help/ Share on other sites More sharing options...
Asheeown Posted November 25, 2009 Author Share Posted November 25, 2009 Bump Quote Link to comment https://forums.phpfreaks.com/topic/182869-lots-of-queries-optimization-help/#findComment-965614 Share on other sites More sharing options...
fenway Posted November 25, 2009 Share Posted November 25, 2009 Persistent connections are evil... open/close once per script, and don't write poor queries that take a long time to execute. Bandwidth for most queries is not an issue. Quote Link to comment https://forums.phpfreaks.com/topic/182869-lots-of-queries-optimization-help/#findComment-965665 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.