Jump to content

Account data or SQLite


driver2

Recommended Posts

Hi,

I was thinking how the performance of using account data compares to using SQLite for saving/accessing account-related stuff. The advantage of account data is that it's easy to use and it is stored together with the accounts, which is sensible for stuff closely related to the account (like register date or something).

However if you have a lot of accounts (let's say a few hundred) and want to filter or sort them by register date (or anything else), I was wondering if SQLite wasn't better suited for that. What do you think?

Greetings

Link to comment
well, if you ever use MySQL you will be dissapointed with sqlite.. it dont offer too much, even if it looks different..

i bet on MTA-MySQL module ;) the fastest, and the easier to manage

sqlite isnt fast for writing, but not slow for reading

He never said anything about MySQL.

SQLite is fast for saving/reading. Accounts are not as fast as SQLite if you deal with loads of accounts. It's because accounts.xml is rewritten every time something changes, say you have 1000 accounts and you want to change just one attribute of one account, it will have to rewrite entire file to do so, at least AFAIK.

Link to comment

Adding rows to SQLite is considerably slower than reading data. However, you also have to use it correctly to make a fair comparison. I'm certainly no expert, but here's an interesting comparison: I added 100 rows to an empty table, which took about 8.8590 seconds. Then I used "BEGIN" and "COMMIT" (http://www.sqlite.org/lang_transaction.html) to send it all in one transaction, and it took only 0.1090 seconds. That's not always usable of course, but if you add much data at once, it can be useful (much like prepared statements in MySQLi, even if the method might be different).

Also, if you compare it with MySQL, you also have to take into account that not everyone may have access to a MySQL database on the same server and sending it to another takes again more time, depending on the connection.

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...