Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


SQLite vs MySQL
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

SQLite vs MySQL

taiprestaipres Member
edited June 2012 in General

I've only played around SQLite in workstation setups, for personal settings, never in a server environment. I'm considering messing around with it on a server to host sites but I wanted to get your guys take, for any that's tried this. From what i've read online SQLite seems to have a much smaller overhead than MySQL(since no server has to run, instead the data is all stored in a single file), it's obviously much simpler, and it seems to shine in systems with a small amount of memory, but who have fast I/O. I come to this conclusion based off of comments such as


"SQLite is restrained by disk I/O access times, and also can’t be load-balanced as easily. "

and the fact blite can be run on 32MB or ram I think. I read some confusing comments though such as

"The most important thing to consider when using SQLite is whether there is a chance of multiple concurrent database writes occurring in your application. Because SQLite databases are literally a single file, only one write operation (UPDATE or INSERT, for example) can occur at a time. When a write operation happens the entire database must literally be locked, written to, and then unlocked. While the database is usually only locked for a very brief moment, it's not uncommon for multiple concurrent writes to occur in many web applications."


and

"SQLite usually will work great as the database engine for low to medium traffic websites (which is to say, 99.9% of all websites). The amount of web traffic that SQLite can handle depends, of course, on how heavily the website uses its database. Generally speaking, any site that gets fewer than a 100000 hits/day should work fine with SQLite. The 100000 hits/day figure is a conservative estimate, not a hard upper bound. SQLite has been demonstrated to work with 10 times that amount of traffic."

Comments

  • gbshousegbshouse Member, Host Rep

    SQLite vs MySQL = rollerblades vs car - you cannot compare them because they are designed for different usage.

  • Its a pain for us mc hosts because people love to use sqlite because of the no config needed so it affects our I/O

  • @gbshouse said: SQLite vs MySQL = rollerblades vs car - you cannot compare them because they are designed for different usage.

    i've heard similar when comparing MySQL vs PostgreSql or Oracle, but people still seem to use MySQL quite a bit :p

  • @PytoHost said: ts a pain for us mc hosts because people love to use sqlite because of the no config needed so it affects our I/O

    True, although we try to move as many as we can to MySQL.

  • @ShardHost said: True, although we try to move as many as we can to MySQL.

    I just use SSD, issue solved.

  • @PytoHost said: I just use SSD, issue solved.

    We use SSDs in some places but not all. We never have an issue with Disk IO though

  • subigosubigo Member

    Personally, I prefer SQLite 99% of the time. I go: simpleXML > SQLite > MySQL.

    Too many people default to PHP+MySQL for every little script they make and it's just a waste of RAM. For most people's usage, SQLite is going to be easier, faster, and smarter.

    Thanked by 1taipres
  • SQLite performs great. Locking is much improved with sqlite3 (compared to sqlite2). In the early days of blite development I created some test scripts and hammered the db pretty good with writes, way more than any real-world blog usage, and never saw any issue. I probably would not use sqlite for a high traffic, write-heavy application like a popular forum, but for sites that are read-heavy and write-seldom sqlite is perfectly fine.

    One thing to keep in mind when considering sqlite is privacy/security. Unlike mysql, sqlite has no conception of users or permissions. A sqlite db is as private and secure as a web-writable text file.

    Thanked by 1taipres
  • Sometimes its hard to connect Mysql via Python. But Sqlite3 is really fantastic in that object.

    Only for python I'll say Sqlite else, its MySQL

Sign In or Register to comment.