Stoolap is a high-performance, columnar SQL database written in pure Go with zero dependencies. It combines OLTP (transaction) and OLAP (analytical) capabilities in a single engine, making it suitable for hybrid transactional/analytical processing (HTAP) workloads.
- Pure Go Implementation: Zero external dependencies for maximum portability
- ACID Transactions: Full transaction support with MVCC (Multi-Version Concurrency Control)
- Fast Analytical Processing: Columnar storage format optimized for analytical queries
- Columnar Indexing: Efficient single and multi-column indexes for high-performance data access
- Memory-First Design: Optimized for in-memory performance with optional persistence
- Vectorized Execution: SIMD-accelerated operations for high throughput
- SQL Support: Rich SQL functionality including JOINs, aggregations, and more
- JSON Support: Native JSON data type with optimized storage
- Go SQL Driver: Standard database/sql compatible driver
Or clone the repository and build from source:
Stoolap comes with a built-in CLI for interactive SQL queries:
The CLI provides a familiar SQL interface with command history, tab completion, and formatted output.
Stoolap can be used in Go applications using the standard database/sql interface:
Stoolap supports three storage modes:
- In-Memory: memory:// - Fast, non-persistent storage for maximum performance
- File-Based: file:///path/to/data - Durable storage with persistence
- Database Engine: db:///path/to/data - MVCC storage with transaction isolation and durability
- INTEGER: 64-bit signed integers
- FLOAT: 64-bit floating point numbers
- TEXT: UTF-8 encoded strings
- BOOLEAN: TRUE/FALSE values
- TIMESTAMP: Date and time values
- JSON: JSON-formatted data
- DDL: CREATE/ALTER/DROP TABLE, CREATE/DROP INDEX, CREATE/DROP VIEW
- DML: SELECT, INSERT, UPDATE, DELETE, MERGE
- Queries: JOINs, GROUP BY, ORDER BY, LIMIT, OFFSET, subqueries, CTE (WITH), DISTINCT
- Indexing: CREATE INDEX, unique constraints, primary keys, multi-column indexes
- Functions: Aggregate and scalar functions
Stoolap includes numerous performance optimizations:
- Columnar Storage: Optimized for analytical queries and compression
- SIMD Operations: Vectorized execution for arithmetic, comparisons, and functions
- Specialized Data Structures: Custom B-trees and hashmaps for high-throughput operations
- Expression Pushdown: Filters pushed to storage layer for faster execution
- Type-Specific Optimization: Optimized operations for different data types
Stoolap is under active development. While it provides ACID compliance and a rich feature set, it should be considered experimental for production use.
Comprehensive documentation is available at:
- Official Documentation: Complete documentation with architecture, features, and usage examples
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.