MYSQL lag on update
#1

Hello,
My server has been lagging since yesterday, when i re-scripted my mysql account system
i found that the server stops working, when i update any field, for about 10sec

that's the updating stock which i use:

pawn Код:
stock MySQL_UpdateInt(const AccountName[], const FieldName[], IntValue)
{
    new query[512];
    format(query, sizeof(query), "UPDATE `accounts` SET `%s` = '%d' WHERE `Username` = '%s'", FieldName, intValue, Account);
    mysql_query(query);
    return 1;
}
Please tell me a way to solve this problem
sorry for bad english
Reply
#2

Where do you use this? Twenty times, In a MAX_PLAYER loop, that is on a timer, that runs every second?
Reply
#3

i found the problem. it is that i use it on stock that saves all player variables, not the variable which i want to save
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)