How to fast queries
#3

20-30/sec definitely is too much for a samp server.
What stuff are you stroing in the database? You shouldnt use mysql as a live data storage, but as a persistent storage to initialize your gamemode variable. E.g. dont fetch shop coordinates from mysql every time you check if a player is near it, but rather load the coordinates to global variables on server start, and eventually update mysql if the coordinates change.
Playerdata also dont need to be stored every second. Store it when the player leaves or the server goes down, and once every few minutes to prevent data loss on crashes.
The best thing to consider is, dont update/select stuff from mysql unless youre sure that it changed since the last query.
Reply


Messages In This Thread
How to fast queries - by Banditukas - 04.08.2014, 08:31
Re: How to fast queries - by mamorunl - 04.08.2014, 11:35
Re: How to fast queries - by Mauzen - 04.08.2014, 11:48
Re: How to fast queries - by Banditukas - 04.08.2014, 12:01

Forum Jump:


Users browsing this thread: 1 Guest(s)