O_DIRECT Direct I/O
Zero-Cost Branch Creation
Adaptive Compression
WAL Crash Recovery
Per-Column Storage Modes
HTAP Dual-Format Storage

Purpose-Built Performance

HeliosCore is a native storage engine designed specifically for HeliosDB's unique capabilities: database branching, vector search, and time-travel queries. Unlike generic key-value stores that require workarounds for these features, HeliosCore was built from the ground up with them as first-class primitives.

  • No compromises — Not built on top of RocksDB, LevelDB, or any generic KV store. Every design decision is purpose-made for HeliosDB's workload patterns.
  • Branch-native — Copy-on-write semantics are built into the storage layer itself, not bolted on as an afterthought.
  • Vector-aware I/O — Storage layout optimized for high-dimensional vector data access patterns alongside traditional row/column data.
  • Time-travel native — Multi-version storage designed for efficient historical data access without the overhead of full snapshots.
SQL
-- Features powered by HeliosCore's
-- purpose-built storage layer

-- Zero-cost branch creation
CREATE BRANCH feature_auth
    FROM main AS OF NOW;

-- Native time-travel queries
SELECT * FROM users
    AS OF TIMESTAMP '2026-01-15 09:00:00';

-- Vector search with optimized I/O
SELECT content,
       embedding <=> $query AS distance
FROM documents
ORDER BY distance
LIMIT 10;

-- All three features leverage the same
-- underlying storage primitives

HTAP Dual-Format Storage

HeliosCore stores table data simultaneously in both row-oriented and columnar formats, enabling a single database to serve OLTP transactions and OLAP analytics without ETL pipelines, separate infrastructure, or data duplication. The storage format is configurable per column — not per table — giving you fine-grained control that competitors like Oracle In-Memory, TiDB, and SingleStore don't offer at this granularity.

  • Per-column storage modes — Each column independently uses Default (row-oriented), Columnar (batched analytics), or Dictionary (low-cardinality) storage. Mix and match within a single table for optimal performance across both workload types.
  • True dual persistence — Columnar data is physically stored in separate 1,024-row batches alongside the row store. Not a runtime transformation or in-memory cache — both formats are durable and transactionally consistent.
  • Workload classification — A workload classifier scores each query plan on an OLTP/OLAP spectrum from its aggregations, joins, filters and DML; EXPLAIN ANALYZE reports the class and the recommended store.
  • Resource budgets — Each query is accounted against separate OLTP and OLAP budgets with built-in defaults (a 60/40 split). Enforcing those budgets as isolation, and configuring the split, are planned.
  • Zero-ETL analytics — Run complex aggregations, window functions, and full-table scans directly on live transactional data. No extract-transform-load pipeline, no stale data, no synchronization lag.
View HTAP SQL Reference →
SQL
-- Per-column storage mode declaration
CREATE TABLE orders (
    id         INT PRIMARY KEY,
    customer   TEXT STORAGE DICTIONARY,
    amount     FLOAT8 STORAGE COLUMNAR,
    created_at INT8 STORAGE COLUMNAR,
    status     TEXT STORAGE DICTIONARY
);

-- OLTP: point lookups use row store
SELECT * FROM orders
  WHERE id = 42;
-- → Point lookup in the row store

-- OLAP: analytics use columnar store
SELECT customer,
       SUM(amount),
       AVG(amount)
FROM orders
WHERE created_at > 1704067200
GROUP BY customer;
-- → Batch scan of the column store

-- Same table. Same data. No ETL.

How Dual-Format Storage Works

When data is inserted, HeliosCore writes each value to the appropriate store based on the column's storage mode. Columnar columns are batched into 1,024-row segments for sequential analytics access, while the row store retains lightweight reference markers for point lookups. Multi-store indexes allow the query optimizer to pick the fastest path for every query.

  • Write path — On INSERT, row-store columns write inline. Columnar columns write to batched column segments and leave a reference marker in the row. Both stores are updated atomically within the same MVCC transaction.
  • Columnar scan — When all queried columns are columnar, HeliosCore bypasses the row store and reads column batches sequentially — suited to aggregations, GROUP BY and full-table analytics. EXPLAIN shows it as “Columnar Scan”.
  • On-demand materialization — For mixed-mode tables, the row scan resolves the reference markers from the column store, so queries always see complete rows regardless of storage layout.
  • Multi-store indexes — ART indexes point to both row and column locations. The optimizer can choose row-store for point queries and column-store for scans on the same indexed column.
  • 3-tier caching — Result cache, statistics cache, and metadata cache with adaptive TTL and DML-aware invalidation. Repeated analytical queries on stable data return instantly from cache.
Architecture
# HTAP Dual-Format Data Flow

INSERT INTO orders (id, amount, status)
              ↓
   +——————————————————————+
   |  Per-column storage mode |
   +——————+———————————————+
          ↓                ↓
  Row Store       Column Store
  [id, ref, status]  [1024-row batches]

Query classification (EXPLAIN):

  SELECT * WHERE id=42
  → Workload: OLTP
  → Recommended store: Row Store

  SELECT SUM(amount) GROUP BY ...
  → Workload: OLAP
  → Recommended store: Column Store
  → Columnar scan of the batches

Resource budgets (built-in defaults):
  OLTP: 60% | 1000 concurrent ops
  OLAP: 40% | 16 concurrent ops
  # tracked today; enforcement planned

Direct I/O (O_DIRECT)

HeliosCore bypasses the operating system's page cache entirely using O_DIRECT, giving the storage engine complete control over what data lives in memory. This eliminates double-buffering overhead and delivers predictable, consistent latency regardless of OS memory pressure.

  • Predictable latency — No surprise evictions from the OS page cache. HeliosCore decides what stays in memory based on actual workload patterns, not OS heuristics.
  • Eliminate double-buffering — Data is never stored twice (once in application buffer, once in OS cache). Memory is used efficiently for actual work.
  • Consistent performance — P99 latency stays tight even under memory pressure. No GC pauses, no page cache thrashing.
  • Better memory utilization — The freed OS page cache memory is available for HeliosCore's own intelligent buffer pool, vector indexes, and query processing.
Performance Profile
# Latency comparison under load
# (internal tests, HeliosDB Lite, buffered
# I/O vs O_DIRECT, synthetic workload on an
# 8-core NVMe host; reproduce on your own
# hardware)

With OS Page Cache (buffered I/O):
  P50 latency:  0.8ms
  P99 latency:  12.4ms   # spikes from eviction
  P999 latency: 45.2ms   # tail latency

With HeliosCore O_DIRECT:
  P50 latency:  0.6ms
  P99 latency:  1.8ms   # predictable
  P999 latency: 3.1ms   # tight tail

Key insight:
  Not just faster median - dramatically
  better tail latency. No surprise
  stalls from OS memory management.

Optimized for Modern Hardware

HeliosCore is designed for the hardware of today and tomorrow. It takes full advantage of NVMe SSDs, large memory capacities, and multi-core processors — capabilities that legacy storage engines (designed in the HDD era) cannot fully exploit.

  • NVMe-optimized I/O — Parallel I/O submission with queue depths matched to NVMe capabilities. Sequential and random reads perform equally well on modern SSDs.
  • Multi-core parallelism — Lock-free data structures and work-stealing thread pools ensure all cores are utilized. No single-threaded bottlenecks.
  • Large memory awareness — Efficient use of 64GB+ memory configurations with tiered buffer management. Hot data stays in-memory automatically.
  • SIMD acceleration — Vectorized operations for compression, checksumming, and vector distance calculations using AVX2/AVX-512 where available.
  • Cache-line friendly — Data structures are aligned to CPU cache lines to minimize cache misses and false sharing.
Architecture
# HeliosCore hardware utilization

NVMe SSD Layer
  Queue depth:     Multi-queue I/O submission
  I/O pattern:     Aligned, direct, parallel
  Read-ahead:      Workload-adaptive prefetch

CPU Layer
  Threading:       Work-stealing thread pool
  SIMD:            AVX2/AVX-512 for hot paths
  Lock strategy:   Lock-free where possible

Memory Layer
  Buffer pool:     Workload-aware eviction
  Allocation:      Arena-based, zero-copy
  Page sizes:      Adaptive (4KB - 2MB)

Result:
  Scales linearly with hardware.
  More cores = more throughput.
  More NVMe = more IOPS.
  More RAM = larger working set.

Intelligent Memory Management

HeliosCore manages its own cache with workload-aware eviction instead of relying on the OS page cache. Per-class memory budgets that adapt to your workload are planned.

  • Workload-aware eviction — Goes beyond LRU. Considers access frequency, recency, and cost-to-reload when deciding what to evict. Scan-resistant by design.
  • Adaptive caching (planned) — separate budgets for row data, index data, vector data and query memory, adjusted from observed query patterns.
  • Hot/warm/cold tiering — Frequently accessed pages are promoted to the hot tier with the fastest eviction resistance. Cold pages are aged out gracefully.
  • Memory-mapped indexes — HNSW vector indexes and B-tree indexes can be memory-mapped for instant startup without warming.
  • Memory budget — the storage cache size is configurable today; a total memory limit covering all allocations, including query execution memory, is planned.
heliosdb.toml
# Storage cache size (bytes)
[storage]
cache_size = 536870912   # 512 MB default

# Planned:
#  - per-class budgets (row / index /
#    vector / query memory)
#  - access-pattern warm-up on startup
#  - a total memory limit with an
#    out-of-memory policy

Compression-First Architecture

HeliosCore treats compression as a first-class feature, not an afterthought. Per-column adaptive compression automatically selects an algorithm for each data type without manual tuning.

  • Per-column adaptive — Each column uses the compression algorithm best suited to its data type. Integers get different treatment than text, timestamps, or vectors.
  • Automatic algorithm selection — HeliosCore profiles sample data and picks the best compressor: ZSTD for general text, LZ4 for speed-critical paths, ALP for floating-point, FSST for short strings.
  • Compression-aware queries — Many predicates can be evaluated directly on compressed data without decompression, reducing both I/O and CPU work.
  • Vector quantization — Product Quantization, tunable per workload: about 16× less resident RAM at recall-safe defaults (internal tests, Nano 3.32.1 vs an unquantized index, see benchmarks.html).
  • Dictionary encoding — Automatic dictionary encoding for low-cardinality columns with in-place dictionary lookup.
Compression Profile
# Per-column adaptive compression
# (automatically selected by HeliosCore)

Column: user_id (INTEGER)
  Algorithm:  Delta + Bit-packing

Column: email (VARCHAR)
  Algorithm:  FSST (short strings)

Column: created_at (TIMESTAMP)
  Algorithm:  Delta-of-delta + ZSTD

Column: description (TEXT)
  Algorithm:  ZSTD (level 3)

Column: embedding (VECTOR(768))
  Algorithm:  Product Quantization
  Resident RAM: ~16x less
  # internal tests, Nano 3.32.1 vs an
  # unquantized index, recall-safe defaults

Column: status (ENUM)
  Algorithm:  Dictionary encoding

# Compression ratios depend on your data.

Branch-Aware Storage

HeliosCore's storage layer natively understands database branching. Copy-on-write at the storage level means branch creation is instantaneous regardless of database size, and branches share unchanged data automatically.

  • Zero-cost branch creation — Creating a branch is a metadata-only operation. No data is copied, regardless of whether the database is 1MB or 1TB.
  • Copy-on-write pages — Modified pages are written to new locations. Original pages remain untouched for the parent branch. Shared pages are reference-counted.
  • Efficient merging — Branch merges operate at the page level, not row level. Conflict detection is fast and precise.
  • Space-efficient — A branch that modifies 1% of the data only uses 1% additional storage, not a full copy.
  • Concurrent branches — Multiple branches can be read and written concurrently without interference, each with their own MVCC timeline.
SQL
-- Create a branch (instant, any DB size)
CREATE BRANCH feature_auth
    FROM main AS OF NOW;

-- Switch to branch and make changes
USE BRANCH feature_auth;

ALTER TABLE users
    ADD COLUMN role VARCHAR(50);

INSERT INTO users (name, role)
VALUES ('admin', 'superuser');

-- Main branch is completely unaffected
USE BRANCH main;
SELECT * FROM users;
-- No 'role' column here

-- Merge when ready
MERGE BRANCH feature_auth
    INTO main;

-- Storage: only modified pages
-- are stored separately.
-- Shared data = zero overhead.

Crash Recovery

HeliosCore provides write-ahead logging with automatic crash recovery. Data durability is guaranteed even during unexpected failures — power loss, kernel panics, or hardware failures. Recovery is automatic and fast.

  • Write-ahead logging (WAL) — All changes are written to the WAL before being applied to data files. Committed transactions are never lost.
  • Checkpointed recovery — On restart after a crash, HeliosCore replays only the WAL entries since the last checkpoint. Recovery time is proportional to the WAL size, not the database size.
  • Page checksums (planned) — a checksum on every data page so corrupted pages are detected on read.
  • Atomic operations — Multi-page updates are atomic. Either all pages in a transaction are updated, or none are. No partial writes.
  • Background checkpointing — Periodic checkpoints reduce recovery time without impacting foreground query performance.
heliosdb.toml
# WAL durability
[storage]
wal_enabled = true
wal_sync_mode = "sync"
# sync:         fsync on every write
# group_commit: batched commits
# async:        OS-managed flush

# Recovery is automatic on restart:
# the WAL is replayed from the last
# checkpoint.

# Planned: page checksums and a
# configurable recovery-time target.

Filter Advisor (Planned)

The Filter Advisor is planned. It will analyse query workloads and choose a probabilistic filter (Bloom, Cuckoo, Xor, Ribbon, MPHF, Count-Min Sketch) for each column, table and segment. The engine does not run the advisor yet: its helios_filter_* system views are present but return no rows until it ships.

  • Filter selection (planned) — rule-based choice of filter: Cuckoo where rows are deleted, Xor/Ribbon for cold data, MPHF for string dictionaries, Count-Min Sketch for frequency analytics, Bloom for high-write paths.
  • Cost/benefit check (planned) — each recommendation weighs estimated lookup savings against storage overhead and is made only when the net benefit is positive.
  • Performance feedback (planned) — hit rate, false-positive rate and lookup latency tracked per filter, so underperforming filters can be evicted.
  • Storage budget (planned) — a cap on filter storage that evicts low-value filters first.
SQL
-- Filter Advisor views: present today,
-- empty until the advisor ships
SELECT * FROM helios_filter_recommendations;
-- (0 rows)

-- Also present and empty today:
--   helios_filter_metrics
--   helios_filter_budget
--   helios_filter_build_queue
--   helios_filter_types

Bulk Load Staging Area (Planned)

A staging area for high-throughput ingestion is planned. Incoming data will be written to append-only buffers, sorted into runs and compacted into main storage in the background while the table stays readable. Today, load data with standard SQL over the PostgreSQL wire protocol.

  • Append-only writes — No random I/O during ingestion. Data is sequentially written to staging buffers, maximizing SSD write bandwidth.
  • Sorted run creation — Staging segments are sorted in-memory before flush, creating pre-sorted runs that merge efficiently into main storage.
  • Background compaction — A dedicated compactor merges staging segments into main storage without blocking foreground queries or new writes.
  • Statistics collection — During ingestion, the staging area will collect column statistics (cardinality, null ratio, value distribution) that feed the planned Filter Advisor's recommendations for newly ingested data.
  • Progress tracking — Bulk load operations report progress, rows processed, and throughput in real time for monitoring and ETL orchestration.
SQL
-- Staging statistics view: present today,
-- empty until the staging area ships
SELECT * FROM pg_staging_area_stats;

-- Today: load with standard SQL over the
-- PostgreSQL wire protocol
INSERT INTO orders (id, customer, amount)
VALUES (1, 'acme', 120.50),
       (2, 'globex', 75.00);

Benefits Over
Legacy Storage Engines

HeliosCore eliminates the compromises that come with building on top of generic key-value stores like RocksDB or LevelDB.

Characteristic RocksDB / LevelDB HeliosCore
Latency consistency Spikes during compaction Predictable P99
Database branching Not supported Native, zero-cost CoW
Time-travel queries Snapshot-based (expensive) Native MVCC versioning
Vector data layout Generic KV (suboptimal) Vector-aware I/O paths
HTAP dual-format Not supported Per-column row + columnar
Workload routing Manual (application-level) Automatic OLTP/OLAP classification
Memory management Block cache + OS page cache Unified buffer pool (O_DIRECT)
Crash recovery WAL replay + manifest WAL replay from the last checkpoint
Compression Per-block, single algorithm Per-column, adaptive
Filter/index tuning Manual (DBA required) Filter Advisor planned
Bulk ingestion Generic write path Staging area planned

HTAP Dual-Format Storage

Per-column row + columnar storage with automatic workload routing. OLTP and OLAP on the same data, zero ETL, with automatic OLTP/OLAP query classification.

Predictable Latency

O_DIRECT I/O and the engine's own cache keep tail latency independent of OS page-cache evictions.

Branch-Native Storage

Copy-on-write at the storage level enables zero-cost branch creation. No external tool or workaround needed.

Adaptive Compression

Per-column algorithm selection with no manual tuning. About 16× less resident vector RAM at recall-safe defaults (internal tests, Nano 3.32.1 vs an unquantized index, see benchmarks.html).

Direct I/O Control

Bypasses OS page cache for predictable memory usage. No double-buffering, no surprise evictions.

Automatic Crash Recovery

WAL replay on restart, proportional to the changes since the last checkpoint rather than to database size.

Filter Advisor (Planned)

Per-column choice of probabilistic filters from workload statistics. Its helios_filter_* views are present but not yet populated.

Bulk Load Staging (Planned)

High-throughput ingestion through append-only staging buffers with background compaction.

Available in HeliosDB Lite and Full

HeliosCore powers the storage layer in both HeliosDB Lite and HeliosDB Full editions. HTAP dual-format storage, Direct I/O and adaptive compression — start building with the next-generation storage engine today.