Skip to content

seanpringle/cram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CRAM

An experimental storage engine for MariaDB.

  • In-memory tables
  • Checkpoint to disk
  • Concurrent reads and writes
  • Engine Condition Pushdown
  • List-level locking
  • Non-transactional
  • No indexes
  • Table scans, baby!

List-level locking?

Each table stores records in a configurable number of linked lists.

No indexes?

Right! The aims are:

  1. Keep memory usage low and writes really fast
  2. Use MariaDB's block-based join algorithms (these are cool)
  3. See how fast in-memory table scans can be done
  4. Use bitmap hints for vague indexing

A bitmap is maintained per column per list. When writing a record each field is hashed, modulo calculated, and a bit set. When scanning for records, Engine Condition Pushdown with equality conditions -- WHERE clauses with = or IN() -- allow the engine to check bitmaps and skip irrelevant lists.

The astute reader can probably predict the potential pitfalls with this approach. However, by configuring the number of lists and the width of the bitmaps a table can be tuned for a specific combination of memory usage, concurrency, and speed.

About

MariaDB storage engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages