Gungneer Posted April 20, 2011 Share Posted April 20, 2011 Before I go any furhter with my scripting, I was wondering if I could get people opinions/personal experience on the difference between using MySQL and SQLite. I personally have experience with both of these out side of MTA so I would be fine using either one, however, since I know that MySQL requires a moduel, I've heard some people say that because of the time that it takes to load a moduel and stuff that it evens out in terms of preformance against SQLite, and in some cases can even be slower, I was wondering if this was actually true or not? Does anyone have any rough benchmark times of preformance in terms of actual querying and MTA processing time? Thanks. Link to comment
proracer Posted April 20, 2011 Share Posted April 20, 2011 I can tell you that SQLite is alot easier then MySQL in my opinion and still efficient and good, so I like it more. Link to comment
Gungneer Posted April 20, 2011 Author Share Posted April 20, 2011 It's not a question of ease here, if I wanted, I'm sure I could write a wrapper resource like I essentially do for PHP and make MySQL as easy, if not easier (at least for me) to use, I'm more worried about benchmark times and such. Like, using MySQL, how slow (if at all) does it slow things down? Link to comment
Orange Posted April 23, 2011 Share Posted April 23, 2011 In my opinion, both databases are for other usages. I use MySQL for storing thousands of informations - from items bought ingame to statistics, while SQLite might be used for smaller amounts of data. Imagine something like that: We have to read 2000 rows from database. MySQL: 1) Module connects to the database server 2) Executes the query 3) MySQL SERVER tries to get the data, while MTA Server isn't really overloaded. 4) The server returns the information from database - this one is faster SQLite: 1) MTA Server opens the large SQLite database 2) Executes the query 3) MTA SERVER tries to get the data - if the performance of the server isn't good - the server may be overloaded, so, for example, network troubles may happen. 4) MTA Server gives the info to the script Again, let's imagine a smaller database: about 100 rows. MySQL: 1) Module connects to the database, it's about 10ms when on same server (initialization) and more if it's in other 2) Query 3) Returning - next 10 ms SQLite: 1) Server instantly reads the file 2) Makes a query 3) Returns data - it should be about 2 times faster than in MySQL That's all. Anyway, when using MySQL in both cases, YOU WON'T NOTICE THE LAGS (unless your MTA Server is in Europe, while MySQL in Chile O,o). That's why I use it ;P Link to comment
Gungneer Posted April 23, 2011 Author Share Posted April 23, 2011 Right Orange, cheers for that, that pretty much sums up what I wanted to know. And about the server location thing, only a total twat would do such a thing, I generally run things on the same machine or over my network at the most. I have also come up with another question regarding this topic: Lets say I wanted to create 2 servers (lets just say an RP and a race server hypothetically) and I wanted users to share the same account, money and cars across both, would I be right in assuming that a MySQL server would be better in that situation? Link to comment
Orange Posted April 24, 2011 Share Posted April 24, 2011 Yes, of course. As far as I remember, you can't share same database using SQLite (it's bundled with mta server), while MySQL is other application. 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