Problem load player password from database takes long time
#5

Quote:
Originally Posted by Kwarde
View Post
- Try checking if it's not something else in the code somehow (during those 6/7 seconds, can other things be done? For example, create a simple command (eg. "/printmessage") that sends some message). If it doesn't work during those 6-7 seconds, something else is up
- Is the MySQL host on the same system the SAMP server is running on? If not, consider doing that
- If you're using a seperate function to load data you might want to just fetch "password" from the user instead of everything (*)
- Check the harddrive being used by the MySQL server to store data. -If it's quite old it could be nearing it's dying days. MySQL read to and writes from files so it the harddrive is bad it could create huge laggs
- Also check your CPU and RAM usage during these operations to see if something is happening there.
Solved.
But I don't understand why it was solved like this:
pawn Code:
mysql_format(SQLHandle, query, sizeof query, "select * from `accounts` where `playername` = '%e';", PlayerName(playerid));
//replaced with
format(query, sizeof query, "select * from `accounts` where `playername` = '%s'", PlayerName(playerid));
Anyway, thank you for your solutions.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)