Jump to content
  • 0

mysql_query vs pc.setqf


Sober

Question

Is it better for performance to store my values in the database using mysql_query or using ymir's pc.setqf?

I have made a pet system quest with levels and bonuses etc with mysql_query and it seems that when i summon or unsummon my pet i lag for about 2-3 seconds

Link to comment

5 answers to this question

Recommended Posts

  • 0

MySQL is usually the bottleneck, but in your case, the problem is in neither.

 

First: is it better to use setqf or mysql_query? setqf, no doubt. It's cached from the server side. But in the case of a complex pet system, it's probably easier to use mysql_query. You may lose performance using mysql_query, but it also may be easier to understand and develop than tons quest flags (For example, with a pet table). You decide what you think is better, I don't think using mysql_query is a bad idea here.

 

But as I tell you, it's not your problem. Where's the delay then?

a ) 50% In your quest receiving mount/dismount commands.

b ) 50% In YMIR's terrible pet mounts implementation.

 

And sadly you can't fix a ) nor b ) unless you compile your own core (and do the appropiate changes).

 

 

  • Love 1
Link to comment
  • 0

Thanks , yes that's true it's far more convenient using a mysql table  than setqf...

Another one question, i am just curious...Is it realy bad using a loop timer for many players ?And will the performance reduce if i decrease the frequency of the loop timer?

Link to comment
  • 0

We didn't see any performance downgrade no. Probably having many loops executed every second can be problematic, but if you space them enough, say 1 minute, the server usually handles them good enough (Although of course it depends on what you are doing when the timer is ran, and if it has a high server load, but well, that's unlikely. The timers running by theirselves don't present any special load, that's what I meant).

  • Love 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.