The sqlite docs page has a nice article [1] on when to use an embedded database such as sqlite and when to go with a client/server model (postgres, mysql or others)
When not to use sqlite: - Is the data separated from the application by a network? - Many concurrent writers? - Data size > 280 TB For device-local storage with low writer concurrency and less than a terabyte of content, SQLite is almost always better. [1] https://www.sqlite.org/whentouse.html
> For device-local storage with low writer concurrency and less than a terabyte of content, SQLite is almost always better.
Isn't MySQL MyISAM faster and this way constitute a better choice for a scientific number crunching application? I mean near 4GB DB, very simple schema, heavy reading load, little/no inserts and no updates.
But then you have to implement all the SELECT and DML logic yourself. SQL makes this a breeze with JOIN, ON UPDATE CASCADE, etc. And being SQL, it is very easy to maintain, even by the PFY that replaces you.
With a database you generally are loading it into RAM, thanks to caching at the database and/or filesystem level, and you get all of the fun database features more or less for free.
There's a performance hit relative to skipping the database altogether and simply allocating 4GB of RAM and accessing it directly, of course.
I dunno, just felt like conventional (since long ago) knowledge that MyISAM is the fastest of all SQL DBs in simplistic non-RAM scenarios. I'm not sure this is true so I ask.
I think the performance MySQL has over sqlite comes from its multithreading more than the storage engine. In my experience sqlite is just as fast as MyISAM for single threaded work.
When not to use sqlite:
- Is the data separated from the application by a network?
- Many concurrent writers?
- Data size > 280 TB
For device-local storage with low writer concurrency and less than a terabyte of content, SQLite is almost always better.
[1] https://www.sqlite.org/whentouse.html
Isn't MySQL MyISAM faster and this way constitute a better choice for a scientific number crunching application? I mean near 4GB DB, very simple schema, heavy reading load, little/no inserts and no updates.
Continue this thread — 9 replies
There's a performance hit relative to skipping the database altogether and simply allocating 4GB of RAM and accessing it directly, of course.
Continue this thread — 2 replies
I think the performance MySQL has over sqlite comes from its multithreading more than the storage engine.
In my experience sqlite is just as fast as MyISAM for single threaded work.
Faster, but at what price?
[1]: https://pouchdb.com/
[2]: https://couchdb.apache.org/
[3]: https://nozbe.github.io/WatermelonDB/