roaddog Posted June 28, 2016 Share Posted June 28, 2016 What's the impact of having sqlite db in each resources and its frequendly save and load? Link to comment
Captain Cody Posted June 28, 2016 Share Posted June 28, 2016 Really it all depends on your processor and hard drive set up. The better it is, the lower the impact. Even with a crappy set up MTA servers are very low-resource applications. Link to comment
Discord Moderators AlexTMjugador Posted June 29, 2016 Discord Moderators Share Posted June 29, 2016 CodyL has a good point there. The impact of having a database per resource is largely dependent of your hardware, resources and server configuration, so measuring it exactly is difficult. However, it is certainly more efficient to have only one database handle open at the time and share it with every resource. That way SQLite can make more optimizations, you avoid fragmenting your hard drive much (although that is not a problem in SSDs) and database backups are easier: just copy one file and you are set. By using only one database you are essentially reducing memory, CPU and I/O overhead, so it will always have less impact than multiple databases. About saving and loading data frequently, all databases are designed to perform well even if there are multiple queries per second, so they are suitable for busy servers. Queries usually just take a fraction of the 10th part of a second, and MTA: SA database scripting functions can be made asynchronous, so the impact is almost always neglible. You just need to make sure that you are not doing useless queries too often and you will be fine. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now