I've got a new suggestion: DB.EXECUTEB (or DB.EXECUTEBACKGROUND, but it's too big for a function name lol)
because using DB.EXECUTE will cause sphere to stop everything on the whole server until the SQL return a response, so if you use DB.EXECUTE with a huge SQL command, it will "freeze" the sphere causing lag on all players
example:
Code:
[FUNCTION UpdateKarma]
ON=@KarmaChange
DB.EXECUTE "UPDATE accounts SET karma='<KARMA>' WHERE uid='<UID>' LIMIT 1"
[FUNCTION UpdateKarmaAllPlayers]
FORCHARS 500 //update logout accounts too
TRIGGER @KarmaChange
ENDFOR
-UpdateKarma: that's a simple function to update just 1 account, no problem using it on a single account, but 100 clients using at the same time will create a huge lag to everyone since sphere must wait the SQL response for every EXECUTE
-UpdateKarmaAllPlayers: using this function, sphere will freeze for 1~
60 seconds depending how many players it will update. Again, no problem updating 3~6 players but will freeze the entire server for more than 60 seconds if used on 5000 accounts
the DB.EXECUTEB will be a great solution for this, since the EXECUTE will run on background and sphere does't need to wait for a SQL response, so we can execute much more SQL commands without any lag
------------------------------------
(05-02-2013 10:21 PM)Mordaunt Wrote: The thing with this is....
There is also a "new feature request" option over on the bug tracker.
I'm not sure which is supposed to be the preferred method of submitting these.
I think it's better create a new forum section named "New Feature Request" under "Sphere .56b" forum