A Database question..

Started by
0 comments, last by _Kami_ 15 years, 3 months ago
I'm working with mysql++, and i open and close the connection with DB each time i need a query. So, it's better open and close a connection each time or open a a connection when i start my server and close the connection when i close the server? The only component that dialogue with the database is my server application. Thanks a lot.
Advertisement
Make it robust enough to handle reconnects at any time, but keep a persistent connection for the life time of the server application.
Why waste time establishing a connection if you could always have it open?
www.ageofconan.com

This topic is closed to new replies.

Advertisement