Raised This Month: $ Target: $400
 0% 

Better way to optimize sql usage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sngz
Junior Member
Join Date: Jan 2009
Old 02-13-2009 , 06:48   Better way to optimize sql usage
Reply With Quote #1

Hello, im using mysql connection on my scripts, and i have one question, whitch way ist most optimal, connect to mysql 1 time and dont disconnect, or connect just when i need to get or put some info in to database, and disconnect when connection isn`t neccessary?
Sngz is offline
Sn!ff3r
Veteran Member
Join Date: Aug 2007
Location: Poland
Old 02-13-2009 , 09:21   Re: Better way to optimize sql usage
Reply With Quote #2

Connect at plugin startup, close connection at plugin end.
__________________
Join US - custom Zombie Server - Custom Addons:



Sn!ff3r is offline
Send a message via Skype™ to Sn!ff3r
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 02-13-2009 , 14:49   Re: Better way to optimize sql usage
Reply With Quote #3

Quote:
Originally Posted by Sn!ff3r View Post
Connect at plugin startup, close connection at plugin end.
Not necessarily. It depends on how much it's used. It also, obviously, depends on the use of threaded querying.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode