MyRocks stores data in column families. These are similar to tablespaces. By default, the data is stored in the default column family.

One can specify which column family the data goes to by using index comments:

 INDEX index_name(col1, col2, ...) COMMENT 'column_family_name'

If the column name starts with rev:, the column family is reverse-ordered.

Reasons for Column Families

Storage parameters like

  • Bloom filter settings
  • Compression settings
  • Whether the data is stored in reverse order

are specified on a per-column family basis.

Creating a Column Family

When creating a table or index, you can specify the name of the column family for it. If the column family doesn't exist, it will be automatically created.

Dropping a Column Family

There is currently no way to drop a column family. RocksDB supports this internally but MyRocks doesn't provide any way to do it.

Setting Column Family Parameters

Use these variables:

  • rocksdb_default_cf_options
  • rocksdb_override_cf_options
  • rocksdb_update_cf_options

(TODO: elaborate)

Examining Column Family Parameters

Check INFORMATION_SCHEMA.ROCKSDB_CF_OPTIONS.

Comments

Comments loading...