CONNECT
{
new query[100], playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
mysql_format(mysql, query, sizeof(query), "SELECT * FROM `Players` WHERE `Name` = '%e' LIMIT 1", playername);
mysql_tquery(mysql, query, "OnAccountLoad", "i", playerid);
}
LOAD
{
forward OnAccountLoad(playerid);
public OnAccountLoad(playerid)
{
PlayerInfo[playerid][pLevel] = cache_get_field_content_int(0, "Level");
PlayerInfo[playerid][pPosX] = cache_get_field_content_float(0, "PosX");
PlayerInfo[playerid][pPosY] = cache_get_field_content_float(0, "PosY");
PlayerInfo[playerid][pPosZ] = cache_get_field_content_float(0, "PosZ");
PlayerInfo[playerid][pPosA] = cache_get_field_content_float(0, "PosA");
PlayerInfo[playerid][pHealth] = cache_get_field_content_float(0, "Health");
PlayerInfo[playerid][pArmor] = cache_get_field_content_float(0, "Armor");
.
.
.
.
.
200 Variables like those is here
return 1;
}
}
Do you have MySQL logging enabled? If so can you post the log when this query is executed here or on Pastebin.
|
[12:06:53 06/12/17] [DEBUG] CMySQLResult::~CMySQLResult() - deconstructor called
[12:07:57 06/12/17] [DEBUG] mysql_format - connection: 1, len: 4028, format: "UPDATE `Players` SET `Level` = '%d', `RPPoens` = '%d', `GameMaster` = '%d', `AdminLevel` = '%d', `RegularRank` = '%d', `DonateRank..."
[12:07:57 06/12/17] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `Players` SET `Level` = '1', `RPPoens` = '0', `GameMaster` ", callback: "(null)", format: "(null)"
[12:07:57 06/12/17] [DEBUG] mysql_format - connection: 1, len: 4028, format: "UPDATE `Players` SET `Sex` = '%d', `Age` = '%d', `GPS` = '%d', `StealedPhones` = '%d', `StealedWatchs` = '%d', `Origin` = '%d'..."
[12:07:57 06/12/17] [DEBUG] CMySQLQuery::Execute[] - starting query execution
[12:07:57 06/12/17] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `Players` SET `Sex` = '1', `Age` = '20', `GPS` = '0', `Ukra", callback: "(null)", format: "(null)"
[12:07:57 06/12/17] [DEBUG] mysql_format - connection: 1, len: 4028, format: "UPDATE `users` SET `Bank` = '%d', `Card` = '%d', `Crimes` = '%d', `CrimeReason` = '%e', `Wanted` = '%d', `WantedLevel` = '%d'..."
[12:07:57 06/12/17] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `Players` SET `Bank` = '0', `Kartica` = '0', `Crimes` = '0'", callback: "(null)", format: "(null)"
[12:07:57 06/12/17] [DEBUG] mysql_format - connection: 1, len: 4028, format: "UPDATE `users` SET `Fishes` = '%d', `BiggestFish` = '%d', `Job` = '%d', `Paycheck` = '%d', `HeadValue` = '%d', `Jailed` = '%d', ..."
[12:07:57 06/12/17] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `Players` SET `Fishes` = '0', `BiggestFish` = '0', `Job` = ", callback: "(null)", format: "(null)"
[12:07:57 06/12/17] [DEBUG] mysql_format - connection: 1, len: 4028, format: "UPDATE `Players` SET `FMemberOf` = '%d', `RankNo` = '%d', `Char` = '%d', `ContractTime` = '%d', `DetSkill` = '%d', `SexSkill` = '%..."
[12:07:57 06/12/17] [DEBUG] mysql_tquery - connection: 1, query: "UPDATE `Players` SET `FMemberOf` = '255', `RankNo` = '0', `Char` =", callback: "(null)", format: "(null)"
[12:07:57 06/12/17] [DEBUG] CMySQLQuery::Execute[] - query was successfully executed within 38.799 milliseconds
[12:07:57 06/12/17] [DEBUG] CMySQLQuery::Execute[] - no callback specified, skipping result saving
Do you have MySQL logging enabled? If so can you post the log when this query is executed here or on Pastebin.
|
Don't you mean milliseconds?
Furthermore, if you have over 200 columns in a single table then your database design is probably bad. Yes, this may sound harsh but I'm saying it like it is. Key elements in determining whether your design is bad:
Lastly, put an index on columns that are frequently used in where-clauses or join-clauses. If the column holds unique values (like a name) then also put a unique constraint to speed up processing even more. |
Having DEBUG enabled will load everything much slower. Keep the default one (errors, warnings and probably info).
|