Jump to content
  • Advertisement
Sign in to follow this  
Tano_ITA

A Database question..

This topic is 3562 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!