Hacker News new | ask | show | jobs
by bob1029 1774 days ago
> SQLite, even though it’s implemented on top of IndexedDB, easily beats out IndexedDB in every single performance metric. The absurdity!

This really is quite incredible. Same idea extends to your filesystem too. Tracking millions of 1KB objects on disk? You could load the whole set into memory substantially faster from SQLite using the same disk. If WAL is enabled with reasonable sync flags, the same applies going back out to disk as well.

SQLite is the most powerful dependency that our product uses today. We have been using it in production as the sole persistence mechanism for 100% of our data for the last 5-6 years now. Recently, we have started leveraging the actual SQL engine to process all of our business logic as well.

2 comments

There are two pieces of tech that punch way above their weight: Lua and SQLite

So many apps could have just saved to a .db file instead of coming up with their own binary format. So many others could have just embedded a tiny, easily sandboxed, Lua library and added scripting languages, rather than embedding larger ones (or worse yet, implementing their own scripts).

Nice. What kind of business logic are you using SQL queries for?
Any sort of decision point that tends to vary between our customers. We are getting really tired of maintaining custom code piles.
By that you mean several piles in different languages? Or one pile for each customer?
One for each. Our solution compiles to a single executable.
Would you not have unique code per customer regardless of if the code is SQL queries or C#?