SA-MP Forums

Go Back   SA-MP Forums > SA-MP Server > Server Support

Reply
 
Thread Tools Display Modes
Old 23/09/2017, 08:02 AM   #11
Mister0
Huge Clucker
 
Mister0's Avatar
 
Join Date: Aug 2015
Posts: 220
Reputation: 19
Default Re: Mysql work slow

And how should I create them
Mister0 is offline   Reply With Quote
Old 23/09/2017, 08:51 AM   #12
whadez
Big Clucker
 
whadez's Avatar
 
Join Date: Jun 2014
Location: Hungary
Posts: 119
Reputation: 21
Default Re: Mysql work slow

You seem to have lack of MYSQL experience.
Could you tell me what version of MYSQL are you using?

Then I can give you proper instructions about how a loading system should look like.
__________________
Reference:
(Laravel, Vue.js, NuxtJS SSR, JWT) LS:RP - Hungary [Click Here]
(Laravel, Vue.js) RC:RP [Click Here]
(Laravel, Vue.js) LS:RP MTA [Click Here]
(Laravel) LimeGaming MTA [Click Here]
(Laravel) Blue Lake Roleplay [Click Here]

I'm willing to take webdevelopment jobs. Contact me for info.
Discord: whadez#4817
whadez is offline   Reply With Quote
Old 23/09/2017, 10:18 AM   #13
Mister0
Huge Clucker
 
Mister0's Avatar
 
Join Date: Aug 2015
Posts: 220
Reputation: 19
Default Re: Mysql work slow

last version R41-4
Mister0 is offline   Reply With Quote
Old 23/09/2017, 10:34 AM   #14
whadez
Big Clucker
 
whadez's Avatar
 
Join Date: Jun 2014
Location: Hungary
Posts: 119
Reputation: 21
Default Re: Mysql work slow

Try it like this.
also use mysql_tquery();

Code:
public LoadBusiness() {
    new i=-1,idx,nums,fields;
	cache_get_data(nums, fields);
	if(nums) {
		for(;++i<nums;)  {
			idx=cache_get_field_content_int(i,"ID");
			BusinessInfo[idx][bID] = idx;
			BusinessInfo[idx][ExtX] = cache_get_field_content_float(i,"ExtX");
			BusinessInfo[idx][ExtY] = cache_get_field_content_float(i,"ExtY");
			BusinessInfo[idx][ExtZ] = cache_get_field_content_float(i,"ExtZ");
			cache_get_field_content(i, "Owner", BusinessInfo[idx][bOwner], YOURMYSQLINDEX, MAX_PLAYER_NAME);
		}
printf("[GAMEMODE]: Business Loaded %i bizz's.", nums);
	}
    return 1;
}
__________________
Reference:
(Laravel, Vue.js, NuxtJS SSR, JWT) LS:RP - Hungary [Click Here]
(Laravel, Vue.js) RC:RP [Click Here]
(Laravel, Vue.js) LS:RP MTA [Click Here]
(Laravel) LimeGaming MTA [Click Here]
(Laravel) Blue Lake Roleplay [Click Here]

I'm willing to take webdevelopment jobs. Contact me for info.
Discord: whadez#4817
whadez is offline   Reply With Quote
Old 23/09/2017, 11:19 AM   #15
Mister0
Huge Clucker
 
Mister0's Avatar
 
Join Date: Aug 2015
Posts: 220
Reputation: 19
Default Re: Mysql work slow

I said I have mysql r41-3 I think what you gave me is mysql r39 and what do you mean YOURMYSQLINDEX what is sql index?

Last edited by Mister0; 23/09/2017 at 11:55 AM.
Mister0 is offline   Reply With Quote
Old 23/09/2017, 11:21 AM   #16
Mister0
Huge Clucker
 
Mister0's Avatar
 
Join Date: Aug 2015
Posts: 220
Reputation: 19
Default Re: Mysql work slow

PHP Code:
public LoadBusiness()
{
    
Toatal_Business_Created cache_num_rows();
    new 
i,x;
    for(
i=0;i<Toatal_Business_Created;i++)
    {
        
x++;
           
//LOADING=========================================================================/
           
cache_get_value_name_int(i"ID"BusinessInfo[x][bID]);
           
cache_get_value_name(i"Owner"BusinessInfo[x][bOwner], MAX_PLAYER_NAME);
        
cache_get_value_name_float(i"ExtX"BusinessInfo[x][bExtX]);
        
cache_get_value_name_float(i"ExtY"BusinessInfo[x][bExtY]);
        
cache_get_value_name_float(i"ExtZ"BusinessInfo[x][bExtZ]);
    }
    
printf("[GAMEMODE]: Business Loaded %i bizz's. %dQ"Toatal_Business_Created,NumQuery),NumQuery++;
    return 
1;


Like I said I use this method and still same tables are loading very slow
Mister0 is offline   Reply With Quote
Old 23/09/2017, 11:37 AM   #17
whadez
Big Clucker
 
whadez's Avatar
 
Join Date: Jun 2014
Location: Hungary
Posts: 119
Reputation: 21
Default Re: Mysql work slow

?


Good luck then.
__________________
Reference:
(Laravel, Vue.js, NuxtJS SSR, JWT) LS:RP - Hungary [Click Here]
(Laravel, Vue.js) RC:RP [Click Here]
(Laravel, Vue.js) LS:RP MTA [Click Here]
(Laravel) LimeGaming MTA [Click Here]
(Laravel) Blue Lake Roleplay [Click Here]

I'm willing to take webdevelopment jobs. Contact me for info.
Discord: whadez#4817
whadez is offline   Reply With Quote
Old 23/09/2017, 11:55 AM   #18
Mister0
Huge Clucker
 
Mister0's Avatar
 
Join Date: Aug 2015
Posts: 220
Reputation: 19
Default Re: Mysql work slow

Quote:
Originally Posted by whadez View Post
?


Good luck then.
Was a simple mistake I type r31 not r41 your code who gave me is not work it gave me error unknow function because is not from this mysql version r41-3
Mister0 is offline   Reply With Quote
Old 23/09/2017, 05:23 PM   #19
whadez
Big Clucker
 
whadez's Avatar
 
Join Date: Jun 2014
Location: Hungary
Posts: 119
Reputation: 21
Default Re: Mysql work slow

Sit down in your chair, update your plugin to r39/41, and rewrite all of your mysql related parts in your gamemode, trust me it'll worth it, and will fix your issue hopefully.

Or just be a lazy f#cker and wait for somebody to help you.
__________________
Reference:
(Laravel, Vue.js, NuxtJS SSR, JWT) LS:RP - Hungary [Click Here]
(Laravel, Vue.js) RC:RP [Click Here]
(Laravel, Vue.js) LS:RP MTA [Click Here]
(Laravel) LimeGaming MTA [Click Here]
(Laravel) Blue Lake Roleplay [Click Here]

I'm willing to take webdevelopment jobs. Contact me for info.
Discord: whadez#4817
whadez is offline   Reply With Quote
Old 23/09/2017, 11:07 PM   #20
Mister0
Huge Clucker
 
Mister0's Avatar
 
Join Date: Aug 2015
Posts: 220
Reputation: 19
Default Re: Mysql work slow

Quote:
Originally Posted by whadez View Post
Sit down in your chair, update your plugin to r39/41, and rewrite all of your mysql related parts in your gamemode, trust me it'll worth it, and will fix your issue hopefully.

Or just be a lazy f#cker and wait for somebody to help you.
I don t need your help(I don't need you to do my work) I need your advice your resolvation if you had this problem in past I don t need to someone to make me the code I just want to show me an example to see what am I make wrong
Mister0 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL too slow NikolaSRB Scripting Help 9 02/09/2017 12:59 PM
Mysql loading slow Dusan01 Scripting Help 2 14/02/2016 10:14 AM
MySQL running slow Luis- Scripting Help 1 12/05/2015 08:53 PM
MySQL slow? PowerPC603 Scripting Help 20 27/01/2014 08:40 PM
MySQL Query is to slow. Momo5000 Help Archive 8 27/03/2011 04:44 PM


All times are GMT. The time now is 08:53 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.