18.12.2010, 05:48
is that SQL plugin faster the the SQLite build in plugin in samp?
cuz i need 37-40sek to save 500 Accounts at the same time.... 1 Accounts takes up to 200ms... its way to long... i need a better sql plugin...
thats the code i use
so will that be faster with this sql plugin here?
cuz i need 37-40sek to save 500 Accounts at the same time.... 1 Accounts takes up to 200ms... its way to long... i need a better sql plugin...
thats the code i use
Код:
#define p PlayerInfo[playerid] public OnPlayerSave(playerid) { new start = GetTickCount(); for(new i = 0; i < MAX_PLAYERS; i++) { format(sql, sizeof(sql), "UPDATE Accounts SET\ 'Password'='%s',\ 'Admin'='%i',\ 'Job'='%i',\ 'SafeMaterials'='%i',\ 'Respect'='%i',\ 'Level'='%i'\ WHERE Username = '%s'", p[pPassword], p[pAdmin], p[pJob], p[pSafeMaterials], p[pRespect], p[pLevel], GetPlayerNameEx(playerid)); db_free_result(db_query(Database, sql)); } format(str, sizeof(str), "[Debug] Zeit: %i", GetTickCount()-start); SendClientMessage(playerid, COLOR_LIGHT_BLUE, str); start = GetTickCount(); format(sql, sizeof(sql), "UPDATE Accounts SET\ 'Password'='%s',\ 'Admin'='%i',\ 'Job'='%i',\ 'SafeMaterials'='%i',\ 'Respect'='%i',\ 'Level'='%i'\ WHERE Username = '%s'", p[pPassword], p[pAdmin], p[pJob], p[pSafeMaterials], p[pRespect], p[pLevel], GetPlayerNameEx(playerid)); db_free_result(db_query(Database, sql)); format(str, sizeof(str), "[Debug] Zeit: %i", GetTickCount()-start); SendClientMessage(playerid, COLOR_LIGHT_BLUE, str); return 1; }