A little guidance.
A lot of possibilities.
SlopDB is an embedded SQL database written in Go. Start with a local database directory, embed it in an application, or enable a SQL protocol listener.
These guides are rendered directly from the project’s documentation. They describe supported behavior, operational settings, and compatibility limits.
Your first database ↗
Build SlopDB, create a table, and run your first queries.
Embed with database/sql ↗
Use the standard Go pool with shared engines and independent sessions.
Find a SQL function ↗
Search every native, JSON, MySQL, PostgreSQL, aggregate, and window function.
Explore shared catalogs ↗
Inspect schema, types, indexes, and constraints through one native catalog view.
See live session activity ↗
Inspect PROCESSLIST, pg_stat_activity, query text, and actual lock waits.
Explore replication ↗
Bootstrap a Raft cluster and understand read consistency.
Consume committed changes ↗
Use row-based MySQL binlog streaming or the native typed changefeed.
Understand read execution ↗
Explore exact COUNT scans, allocation reuse, prepared mutations, and join execution.
Start small
Build from the repository root with Go 1.22.2 or newer:
git clone https://github.com/midom/slopdb.git
cd slopdb
go build -o slopdb .
./slopdb ./example-dbRecent additions
- Read execution and allocation reuse: exact COUNT scans, typed predicates and aggregates, prepared mutation buffers, and compact join predicates. Scans execute on the calling query’s goroutine; independent sessions remain concurrent.
- Bounded primary-key reads reuse result storage for eligible small IN and range queries, with snapshot-preserving fallback for larger data.
- Reusable streaming buffers reduce row and BLOB decoding allocations across native queries, database/sql, MySQL streaming, and PostgreSQL COPY while preserving public result ownership.
- Lean MySQL responses: negotiated optional result metadata, EOF deprecation, and bounded response buffers for text and prepared queries.
- Reusable row values: ValuesInto reuses caller-owned slices and BLOB buffers while preserving NULL and empty-BLOB semantics.
- Parsed SELECT execution: reusable primary-key point, IN, and range results or a rows fallback under one statement snapshot.
- Retained prepared bindings: session-owned execution trees survive garbage collection, with catalog, statistics, and rollback invalidation.
- Direct database/sql text queries avoid allocating prepared-statement pools for calls without arguments.
- Session shutdown contexts let protocol adapters cancel blocked response writes after row iteration finishes.
- SELECT benchmark updates: a typed mysql-lean wire control and opt-in server profiles, with explicit client-cost and profiling caveats.
Choose your path
Start here
Function reference
- Find a SQL function
- Core SQL functions
- JSON functions
- MySQL-style functions
- PostgreSQL functions
- Aggregate functions
- Window function reference
Build applications
- Embedded database/sql driver
- Prepared statements
- Application operations
- Common table expressions
- Window functions
- UPSERT
- Unicode & collation
Connect & replicate
Manage your database
- Shared catalogs
- Live session activity
- Schema changes
- Online indexes
- Planning changes
- Table status
- Troubleshooting & LSM status
- Unexpected query results
SQL compatibility
Understand performance
- Read execution & allocation reuse
- Query profiling
- Query statistics
- Memory & resources
- Page sizes
- Performance measurements
- Performance checks
- Tests & benchmarks
Benchmark tools
- Concurrent small-row SELECT benchmark
- Canonical SQL storage measurements
- SlopDB TPC-C-style load tester
- Three-engine TPC-C-style comparison
- TPC-H query benchmark
- Concurrent write benchmark
Engine & query details
- Block cache memory
- Canonical SQL storage comparison, 2026-10-12
- Memtable options
- Database page-size comparisons
- Page-size measurement protocol
- Execution, APIs and SQL improvements
- Q6 physical access regression
- Further small-row SELECT improvements
- GOGC=200 with the default memory limit
- Small-row SELECTs with 100 concurrent readers
- Scaling small-row SELECTs beyond the initial cache fixes
- Database storage comparisons
- Storage comparisons above 100 MiB
- TPC-C-style comparison, 2026-10-11
- Indexed joins, selective execution, and allocation improvements
- TPC-H execution improvements, 2026-10-11
- Ordered GROUP BY and TPC-H Q18
- TPC-H execution performance, 2026-10-11
- Typed analytical execution
Benchmark reports
- Paired SlopDB improvement measurements
- Conditional COMMIT index cleanup
- Raft tail latency investigation
- One full Raft node and two logs-only voters
- Background WAL rotation fsync
- SELECT concurrency after counter and reference changes
- Canonical SQL storage evidence
- Canonical TPC-C storage evidence
- Matched-window, fully compacted SlopDB storage evidence
- Historical page-size evidence with fixed 8 MiB Zstd windows
- INSERT performance with 100 rows per transaction
- Concurrent skip list and parallel memtable installation
- Concurrent writes: 96 and 200 writers
- INSERT retry with optional hash memtables and WAL disabled
- Optional hash memtables and WAL-disabled random UPDATE
- Random UPDATE above one million transactions/s
Project overview
Performance with context
The project includes regression tests and SQL reference fixtures, plus TPC-C-inspired and TPC-H development workloads. These are development benchmarks, not certified TPC scores. Compare runs using matching datasets, concurrency, execution modes, and durability settings.