store | blogs | forums | twitter | facebook | wiki | downloads | support portal
Atomic Secure Linux
It is currently Mon Oct 14, 2019 8:53 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: CPU and Memory Usage: Connect and disconnect
Unread postPosted: Sat Feb 13, 2016 11:13 pm 
Offline
New Forum User
New Forum User

Joined: Sat Feb 13, 2016 10:45 pm
Posts: 4
Location: Brazil
I'm having problems with consumption of the CPU and the memory.
What of these options would help me to consume less?


Option #1
Connect to sql server, execute the sql command and disconnect once it is done. And do again for each command.

Option #2
Connect to sql server, execute all the sql commands and disconnect when script dies.


More ideas will be very appreciated.

Thank you


Top
 Profile  
Reply with quote  
 Post subject: Re: CPU and Memory Usage: Connect and disconnect
Unread postPosted: Tue Feb 16, 2016 7:34 am 
Offline
Forum Regular
Forum Regular

Joined: Tue Aug 01, 2006 2:45 pm
Posts: 573
Location: Netherlands
Using a single connection will most likely be more efficient.

However, if you keep the connection open for a long time, without really using it, you will be wasting a tiny bit of memory and an otherwise available connection slot on the database server. If you have a huge amount of concurrent requests this can become an issue.

_________________
Lemonbit Internet Dedicated Server Management


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group