AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Better way to optimize sql usage (https://forums.alliedmods.net/showthread.php?t=85589)

Sngz 02-13-2009 06:48

Better way to optimize sql usage
 
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?

Sn!ff3r 02-13-2009 09:21

Re: Better way to optimize sql usage
 
Connect at plugin startup, close connection at plugin end.

Hawk552 02-13-2009 14:49

Re: Better way to optimize sql usage
 
Quote:

Originally Posted by Sn!ff3r (Post 760864)
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.


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

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