Posts: 534
Threads: 265
Joined: Jul 2014
Hi,
I'am using latest mysql BlueG plugin. But i want to make my queries faster. I don't know maybe for others it'is normal speed but for my, i see that there is about 20-30 queries/sec. It'is possible to make queries 2x, with new method or something like this?
Posts: 4,878
Threads: 85
Joined: Jun 2007
Reputation:
0
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.
Posts: 534
Threads: 265
Joined: Jul 2014
I know that already, but other way i can't to find? You understand that if will be 1000 players in game? a lot of connections, disconnections, checking is banned from mysql, top10 from database it'is just a small piece. A lot of other stuff, commands and so on...