Turso is a Rust-rewrite of SQLite with a lot of exciting enhancements. Like concurrency, tantivy for searching and others. It’s compatible with SQLite today but it’s still in development. I just started a new adapter to get this integrated into Rails and it looks hopeful. But it’s a big job, I just wanted to let people know I’m working on this and maybe others will find it interesting. It’s not production ready but it can be after more testing. So consider it a fun toy for now and the end goal is to get this up to par.
I think the Turso team has already started working on it! GitHub - tursodatabase/libsql-activerecord · GitHub I had a chance to talk with Levy, great guy! It could be nicer to try to collaborate with them.
Hi, I have the activerecord gem working now. From my testing the db is fairly slower than sqlite and their full text search engine (tantivy) is fairly slower as well. And also the true concurrency (multi-writer) support doesn’t work because of the way activerecord runs. Although it’s working I don’t see any reason to use this over sqlite. I’m hoping in the future this will become a solid alternative, for now stick with sqlite.
Benchmark Results (10k rows, 3 runs, stable)
Workload Turso ips SQLite FTS5 ips Ratio Winner
W1 single common (database) ~33 ~172 0.19× sqlite
W2 single rare (turbine) ~34 ~173 0.20× sqlite
W3 multi-term (ruby rails) ~23 ~163 0.14× sqlite
W4 phrase (active record) ~178 ~24,900 0.007× sqlite
Verdict: SQLite FTS5 is 5–140× faster than Turso Tantivy FTS on query latency in this local embedded setup. The gap is largest for phrase queries (W4). Sanity checks confirmed identical hit counts (delta=0.0) across engines, so the comparison is apples-to-apples.