Jump to content

Tables & mysql & auto-save


Recommended Posts

Hi. I was thinking of creating a system so that my mysql server would only have to be used every 30 minutes. My idea was to recreate all mysql databases with tables and then update/add them just like a normal mysql server but without the use of one. Then I'd auto save these results each 30 minutes. Is this somewhat possible, would this give me better performance or is this just a clusterfuck and totaly not worth it?

Link to comment
Better idea would be to save into table, and when player leaves server - saves the values in table. That would be better prefomance, couse you wouldn't ask MySQL every action.

Basically this. When the resource starts or a player joins the server it puts all data in a table. You can create a timer to update the MySQL database every 30 minutes. Make a function for the updating then call that function every 30 minutes for all players using setTimer. And onPlayerQuit would trigger the update for that player aswell.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...