MySQL Connections

GaryS128

Weaksauce
2FA
Joined
Dec 18, 2006
Messages
111
I'm building a threading application. The application will need to remaining running on a virtual server. The application will be checking a table just about every 30 seconds to a minute, depending on the clients demands. My question, is it better to open and close the connection every 30 seconds, or is it better to keep a constant connection open?
 
I have found that it really doesn't add too much overhead to open and close the connection when needed. [H]ardware these days is screamin' fast for these types of operations, with typical CPU's having dual and quad cores :D. You probably would not notice a difference, especially if your DB employs efficient use of indexing.

Do you have a large data set and many simultaneous users and connections to the DB?
 
Back
Top