News for hackers. Stuff that matters.
Re:Stoolap: High-performance embedded SQL database in pure Rust by Arcuru on Thursday December 11, 2025 @09:59PM (#46240387)
> Time-Travel Queries: Query historical data at any point in time:

The example here looks like it may be storing the full history of transactions? Is that right? That's a pretty high cost to pay for something that's not touted as a marquee feature.

I'm working on a DB[1] that stores full transaction history but it's so that I can support decentralized synchronization. It's in service of my marquee feature so I need to pay the cost of storing history, but I'm surprised that Stoolap also seems to be doing it for a local embedded database.

[1] https://github.com/arcuru/eidetica

Re:Stoolap: High-performance embedded SQL database in pure Rust by rich_sasha on Friday December 12, 2025 @03:24AM (#46242020)
I would imagine (but haven't looked at it at all) that it's a byproduct of an append only data format. Then having a historical PoV is cheap - you simply disregard changes after a certain time.

Append-only has many other benefits, including zero contention between many readers and (single) writers. In the vanilla version, writers still contend though.

Re:Stoolap: High-performance embedded SQL database in pure Rust by hansvm on Saturday December 13, 2025 @09:39AM (#46254822)
I think their point is that system timestamps for that append-only format aren't good enough. You need logical timestamps corresponding to increasing transaction ids.
Re:Stoolap: High-performance embedded SQL database in pure Rust by rich_sasha on Thursday December 11, 2025 @10:06PM (#46240431)
Looks very interesting!

Some comparison to another embedded SQL DB, i.e. sqlite3, would be useful. How abusable is it? What tradeoffs are taken? Etc.

Re:Stoolap: High-performance embedded SQL database in pure Rust by seg_lol on Thursday December 11, 2025 @10:09PM (#46240453)

    Initial release: Stoolap - A Modern Embedded SQL Database in Pure Rust
    
    Stoolap is a high-performance embedded SQL database featuring:
    
    Core Features:
    - Full ACID transactions with MVCC (READ COMMITTED & SNAPSHOT isolation)
    - Cost-based query optimizer with adaptive execution
    - Parallel query execution via Rayon
    - 101+ built-in functions (string, math, date/time, JSON, aggregate, window)
    - Multiple index types: B-tree, Hash, Bitmap (auto-selected or explicit)
    - Multi-column composite indexes
    - WAL + snapshots with crash recovery
    
    SQL Support:
    - JOINs (INNER, LEFT, RIGHT, FULL OUTER, CROSS)
    - Subqueries (scalar, IN, EXISTS, correlated)
    - Common Table Expressions (WITH and WITH RECURSIVE)
    - Window functions (ROW_NUMBER, RANK, LAG, LEAD, etc.)
    - ROLLUP, CUBE, GROUPING SETS
    - Temporal queries (AS OF TIMESTAMP/TRANSACTION)
    - Views, RETURNING clause, ON DUPLICATE KEY UPDATE
    
    104K lines of Rust | No C dependencies | Full documentation at stoolap.io
Re:Stoolap: High-performance embedded SQL database in pure Rust by jdub on Thursday December 11, 2025 @11:08PM (#46240783)
What an impressive release!

It makes me very curious.

Delivered to GitHub fully-formed: A grand total of 9 commits (mostly docs and CI fixes), all in the last 5 hours, and v0.1.0 released 3 hours ago.

No external database/storage-layer dependencies, so it's not "just" a CLI/server/parser wrapper around other libraries doing the "real work".

It appears to have a substantial test suite (76% code coverage, not skipping the scary bits), and great documentation.

There's a bit of context on https://github.com/stoolap but not much else about the author, project goals, relationship to other systems, e.g. it could be the data layer for something else.

(Interestingly, there's an archived stoolap-go repo with a very similar Go implementation of a columnar/hybrid database, so this is not the author's "first draft".)

Re:Stoolap: High-performance embedded SQL database in pure Rust by forgotpwd16 on Thursday December 11, 2025 @11:15PM (#46240813)
Can assume they worked on this last few months when they stopped development in the, now archived, Go attempt, but they scrapped the entire git history on publication. Still, even if consider heavy AI use, looks like they put quite the effort in this.
Re:Stoolap: High-performance embedded SQL database in pure Rust by esafak on Friday December 12, 2025 @12:32AM (#46241173)
I too am curious how to the first commit came about: https://github.com/stoolap/stoolap/commit/768eb836de0ff072b8...

Note to owner: CI is broken.

Re:Stoolap: High-performance embedded SQL database in pure Rust by murat3ok on Friday December 12, 2025 @03:21PM (#46248382)
The Go version was my first attempt. Hit some performance walls I couldn't solve cleanly, so I rewrote the whole thing in Rust over the past 6 months. Got about 5x speedup and the concurrency story is way better with ownership.

The git history thing honestly my commits were a mess after months of work. Dead ends, experiments, "fix fix fix" commits. Figured I'd start clean for release. In hindsight, probably should have kept the ugly history looks less suspicious than one big commit.

Goal is basically SQLite but with real MVCC and analytical features (window functions, parallel queries). Something you can embed but that doesn't choke on concurrent writes or complex queries.

Community kill me here but other side thank you for the positive comment here.

Re:Stoolap: High-performance embedded SQL database in pure Rust by ctrust on Saturday December 13, 2025 @01:17AM (#46252488)
Very interesting. Roughly speaking, how does performance compare to SQLite?
Re:Stoolap: High-performance embedded SQL database in pure Rust by jdub on Saturday December 13, 2025 @03:30AM (#46253071)
Yay, glad you found the discussion (well, the good bits), and thanks for the answer. It's cool work!
Re:Stoolap: High-performance embedded SQL database in pure Rust by Sytten on Thursday December 11, 2025 @11:46PM (#46240959)
In the same area, I am tracking the Rust rewrite of sqlite by Turso [1]. The big advantage is the file format compatibility.

[1] https://github.com/tursodatabase/turso

Re:Stoolap: High-performance embedded SQL database in pure Rust by egorfine on Friday December 12, 2025 @05:47AM (#46242858)
It's not a rewrite of SQLite in Rust.

It's an entirely new project that happens to have some compatibility with one of the popular SQL databases, namely SQLite.

Re:Stoolap: High-performance embedded SQL database in pure Rust by forgotpwd16 on Friday December 12, 2025 @06:14AM (#46243010)
From the devs themselves[0]:

>Our goal is to build a reimplementation of SQLite from scratch, fully compatible at the language and file format level, with the same or higher reliability SQLite is known for, but with full memory safety and on a new, modern architecture.

And they call it rewrite in a recent followup post[1].

[0]: https://turso.tech/blog/introducing-limbo-a-complete-rewrite...

[1]: https://turso.tech/blog/we-will-rewrite-sqlite-and-we-are-go...

Re:Stoolap: High-performance embedded SQL database in pure Rust by lucideer on Friday December 12, 2025 @07:14AM (#46243413)
The wording & framing of these things is an interesting topic in the context of the W3C's decision to drop WebSQL.

A "rewrite" softly implies a replacement (intent that SQLite users would all migrate to Turso eventually & SQLite would cease to exist as a project). This isn't the strict definition of a rewrite but the implication is there in the language.

OTOH the W3C shut down that spec because it required competing implementations to exist. This imagines a world where Turso & SQLite coexist actively.

E.g. micropython isn't a rewrite of cpython even though they both target compatible python, Chrome isn't a rewrite of Firefox even though they both target a range of compatible languages & formats (but Firefox was a rewrite of Netscape - the word depends heavily on context).

I realise this usage isn't coming from you, it's coming from the Turso devs themselves, but it does feel like an overstep on their part.

The Turso guys can use whatever words they like in their blogposts, they're not the authority on whether it constitutes a rewrite.

Re:Stoolap: High-performance embedded SQL database in pure Rust by egorfine on Monday December 15, 2025 @05:17AM (#46272558)
> it does feel like an overstep on their part.

It's the Rust superiority complex that's subtly speaking thru the Rust "rewrite" projects. Of course rust is better so why would anyone want to stay on the old, C-coded version?

Re:Stoolap: High-performance embedded SQL database in pure Rust by egorfine on Friday December 12, 2025 @07:04AM (#46243350)
They may call it all they want. It's been common between some Rust developers to steal valor by highjacking the name of original project for their own fun rewrites.

Turso a third party project that has nothing to do with SQLite.

Re:Stoolap: High-performance embedded SQL database in pure Rust by forgotpwd16 on Friday December 12, 2025 @07:53AM (#46243667)
Ah, it was about the usage of rewrite by such third-party efforts. In this case, yes, the original reimplementation (could have also call it alternative) wording is probably better. Was confused at the "happens to have some compatibility" part because the project was started with that intent so it wasn't a coincidence.
Re:Stoolap: High-performance embedded SQL database in pure Rust by egorfine on Friday December 12, 2025 @08:02AM (#46243725)
It's not a reimplementation either. It's just a separate project which has nothing to do with SQLite. Thus mentioning it as "SQLite resomething" is not fair.

SQLite compatibility at file level is a nice perk which I am not totally convinced is truly needed at all. Like, it's hard to imagine scenarios where this is useful. But it can be.

Anyway, godspeed. Just don't steal valor.

Re:Stoolap: High-performance embedded SQL database in pure Rust by lazylester on Friday December 12, 2025 @03:03PM (#46248188)
"...hard to imagine scenarios where [file-level compatibility] is useful" what am I missing? Surely dropping a more performant dbm into an existing project would be the application? No?
Re:Stoolap: High-performance embedded SQL database in pure Rust by egorfine on Monday December 15, 2025 @05:21AM (#46272581)
Could you imagine a project that is simultaneously:

1. having such a huge local SQLite file that migration to another format is unfeasible;

2. bottlenecking on a single specific metric that happens to be more performant in Turso;

3. ready to introduce another programming language and its build toolchain into the project;

Re:Stoolap: High-performance embedded SQL database in pure Rust by sudarshnachakra on Friday December 12, 2025 @01:02AM (#46241294)
Does this support concurrent writers (unlike sqlite)? Quite an impressive feature set for a one-person project.

Also is this a single file DB? If so is the format stable?

Re:Stoolap: High-performance embedded SQL database in pure Rust by edf13 on Friday December 12, 2025 @02:54AM (#46241870)
Sounds very interesting - I’ve used SQLite in a few Rust based projects where performance was the deciding factor… a perf comparison with this would be very useful
Re:Stoolap: High-performance embedded SQL database in pure Rust by dash2 on Friday December 12, 2025 @03:06AM (#46241928)
I think the name is not good. It sounds like "stool app". Among other things, "stool" means poo.
Re:Stoolap: High-performance embedded SQL database in pure Rust by duttish on Friday December 12, 2025 @03:24AM (#46242017)
Yea, my first association was stool -> poo.

I've been trying to think of what other meaning they could have gone for but got nothing. Stoo lap? Sto olap?

Re:Stoolap: High-performance embedded SQL database in pure Rust by bronlund on Friday December 12, 2025 @07:38AM (#46243554)
SQL Tool something something?
Re:Stoolap: High-performance embedded SQL database in pure Rust by bronlund on Friday December 12, 2025 @01:24PM (#46247020)
SQL Transactional Objects OnLine Analytical Processing. My best guess so far.
Re:Stoolap: High-performance embedded SQL database in pure Rust by kolektiv on Friday December 12, 2025 @04:07AM (#46242257)
Another voice basically begging them to change the name here, yeah. It might be quite interesting as a tool, but please...
Re:Stoolap: High-performance embedded SQL database in pure Rust by dominotw on Friday December 12, 2025 @07:47AM (#46243622)
they are even highlighting a in green after stool to break the word into stool.

i am guessing its a joke?

Re:Stoolap: High-performance embedded SQL database in pure Rust by DoctorOW on Friday December 12, 2025 @05:11AM (#46242636)
Comments especially feel vibe coded. Not necessarily bad, just not something I would trust with prod data.

    /// Create a new empty row
    pub fn new() -> Self {
        Self { values: Vec::new() }
    }
Re:Stoolap: High-performance embedded SQL database in pure Rust by Klonoar on Friday December 12, 2025 @05:33AM (#46242767)
This particular bit doesn't scream vibe-coded to me at all.

In fact it looks like a generic comment I'd write and come back to later.

Re:Stoolap: High-performance embedded SQL database in pure Rust by spoiler on Saturday December 13, 2025 @09:30AM (#46254755)
I generally like—and write—these types of doc comments myself. It just looks nicer in docs/intellisense.

I'm a big proponent of "everything public should have a doc comment," even if it's a short sentence. Doesn't hurt to have it. I never understood people who are allergic to comments.

The fact LLMs add comments is one of the few non-sloppy things they do, IMO

Re:Stoolap: High-performance embedded SQL database in pure Rust by ITniggah on Friday December 12, 2025 @05:50AM (#46242874)
'Stool-', yes stool it is. What's next? Fudgepacka?
Re:Stoolap: High-performance embedded SQL database in pure Rust by bronlund on Friday December 12, 2025 @07:14AM (#46243418)
Bold name choice.
Re:Stoolap: High-performance embedded SQL database in pure Rust by skylurk on Friday December 12, 2025 @12:42PM (#46246498)
I read it as stool lab...

Stoolap: we index your shit

Re:Stoolap: High-performance embedded SQL database in pure Rust by JohnCClarke on Friday December 12, 2025 @08:07AM (#46243764)
Excited for this! A couple of questions:

1. What is the resolution of timestamps (milli-, micro-, nano-seconds)? 2. Any plans for supporting large data BLOBs (e.g. PostgreSQL TOAST)? This would open up a lot of use cases and would be really interesting to make compatible with the in-memory emphasis for the atomic data types.

Re:Stoolap: High-performance embedded SQL database in pure Rust by kekqqq on Friday December 12, 2025 @08:43AM (#46244060)
The project is very new, with two days of unique days with commits and 11 commits in its history. I would bet it is vibecoded.
Re:Stoolap: High-performance embedded SQL database in pure Rust by jdub on Friday December 12, 2025 @10:14AM (#46244877)
Don't let "AI" make you jump at shadows. Maybe, but probably not.

The first commit was pretty fully-formed, which without "AI" glasses on just means someone did a whole bunch of work before exposing/releasing their work.

Re:Stoolap: High-performance embedded SQL database in pure Rust by andrewl on Friday December 12, 2025 @08:52AM (#46244135)
As a big fan, and user, of SQLite, this looks like something to watch. And I agree with the comments about the unfortunate name. Just yesterday there was a post here about bad names for software:

https://news.ycombinator.com/item?id=46234806

Re:Stoolap: High-performance embedded SQL database in pure Rust by kiliancs on Friday December 12, 2025 @09:01AM (#46244222)
I would be interested in seeing numbers backing the high performance claims.
Re:Stoolap: High-performance embedded SQL database in pure Rust by GlacierFox on Friday December 12, 2025 @09:38AM (#46244548)
Stoolap? Sounds disgusting.
Re:Stoolap: High-performance embedded SQL database in pure Rust by riku_iki on Friday December 12, 2025 @01:54PM (#46247368)
Any benchmarks to compare to sqlite and pg?