Posts: 220
Threads: 28
Joined: Aug 2015
Reputation:
0
So why mysql load tables very slow on windows 10?
When I open the console it say mysql database conected instantly but the mysql_pquery who load the tables from data base it load after some seconds and load one by one each on an interval of 2-7 seconds random.
What can I do I try many methods optimized the apache change the mysql version re write the query but still very slow
Posts: 1,506
Threads: 13
Joined: Jun 2015
What do you mean? We don't get you.
Posts: 220
Threads: 28
Joined: Aug 2015
Reputation:
0
I can open any samp server but if the server is connected to the mysql database then my tables load very slow
like this
mysql_pquery(handle, "SELECT * FROM `business`", "LoadBusiness");
mysql_pquery(handle, "SELECT * FROM `jobsname` ORDER BY `ID` ASC", "LoadJobs");
my gamemode is loaded with vehicles model and all what he need but after some seconds or minutes it show the tables are loaded
Posts: 32
Threads: 2
Joined: Nov 2011
Reputation:
0
Show me where you fetch all the data.
Posts: 203
Threads: 4
Joined: Feb 2017
Reputation:
0
Because these queries are threaded. Use mysql_query instead of mysql_pquery for server loading queries.
Off course you can't do it without rewriting a lot of loading code.
Posts: 220
Threads: 28
Joined: Aug 2015
Reputation:
0
Ok let's say I modified every line but why onwindows 7 I didn t have this problem?
I edited and replaced and still same
Posts: 220
Threads: 28
Joined: Aug 2015
Reputation:
0
The problem is if I delete every
for(i=0;i<Toatal_Business_Created;i++)
{
cache_delete etc
}
the table load ok slow but at least they are loading every in the same minute, but How else could I load every line from tables?
Posts: 1,506
Threads: 13
Joined: Jun 2015
You're creating the loops the wrong way. Why are you having two variables which do the same?
PHP Code:
for(new i; i < SOME_VALUE; i++)
{
fetch data
assign data
}
I don't see the need of a different variable at all.