MySQL Lag - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MySQL Lag (
/showthread.php?tid=309104)
MySQL Lag -
Ricop522 - 06.01.2012
What can I do agaisnt MYSQL Lag's?
Make threats, optimize my code, what you suggest?
Re: MySQL Lag -
BlackWolf120 - 06.01.2012
do u have a code example for us?
Some tips i can tell u out of mind:
-mysql_free_result after every SELECT query
-Optimize your string/query/row lengths
-Optimize your mysql tables (creating only adjusted fields/columns=> int and vchars, create only the string lenght you really need.)
-Use sscanf to split rows/results.
DONT use a saving system on OnPlayerUpdate (u may laught but ive already seen this multiple times
)
//edit:
Use the profiler plugin to be sure mysql causes the lag!
Re: MySQL Lag -
Vince - 06.01.2012
Both.