Hasty Briefsbeta

Bilingual

Stoolap/Node: A Native Node.js Driver That's Surprisingly Fast

6 days ago
  • #rust
  • #database
  • #performance
  • Stoolap is an embedded SQL database written in pure Rust, now with a Node.js driver (@stoolap/node) for direct access from JavaScript/TypeScript.
  • Stoolap outperforms SQLite in 47 out of 53 benchmark tests, especially in complex queries (e.g., COUNT DISTINCT is 138x faster).
  • Key features include MVCC transactions, cost-based query optimizer, parallel execution, semantic query caching, and temporal queries.
  • SQLite still wins in simple, single-row operations (1.0x to 1.6x faster), but margins are small.
  • Performance advantages come from MVCC without locks, cost-based optimizer, and parallel execution.
  • The Node.js driver supports async/sync APIs, prepared statements, transactions, and file-based persistence with WAL.
  • Getting started: npm install @stoolap/node; pre-built binaries available for macOS, Linux, and Windows.
  • Future plans include connection pooling helpers and streaming query support.