4 ms·
The biggest problem with SQLite is that it seems to be easy to use it wrong. If you are using SQLite as it is supposed to be used, it has much better performanc
by arendtio 8y ago
The biggest problem with SQLite is that it seems to be easy to use it wrong. If you are using SQLite as it is supposed to be used, it has much better performance than its reputation suggests.
- pjc50 8y agoIn what way?
- tim333 8y agoNot quite sure but Quora suggests >[slow]...This is because the entire database was locked every time someone viewed the page because it contained updates/inserts. So avoid loads of inserts I guess https://stackoverflow.com/questions/54998/how-scalable-is-sqlite https://stackoverflow.com/questions/54998/how-scalable-is-sq...
- trashcan 8y agoWrites require an exclusive file handle/lock (only one write can happen at a time), so read heavy uses are usually a better match.
- arendtio 8y agoI think the easiest way to do it wrong, is to close the file every time you finished your operation. With the default settings, this will sync and wait until the filesystem completes its operation. So unless you will close the file for a long time, keep it open. If you want to access the DB in a multi-threaded environment you better let one process manage the database. I guess 90% or performance problems with SQLite come from the filesystem.