​Indexing

LSM Index

LSM (Log Structure Merge) Index is optimized for storing and searching Big Data. The partitions of the LSM indexes are maintained for each level, and the lower level partitions are merged and moved to the upper level. The subpartitions used to create the higher level partitions are deleted.
This Index Level Partition Building is performed by Background Thread. Since the upper level partitions are merged with the lower level partitions, they are created as one partition, so there are the following advantages when searching through the index.

  • If the key is duplicated, disk space is saved for key storage because it is stored only once.
  • Searching for multiple partitions reduces the cost of opening and closing the file when searching for one index partition, and the number of index pages accessed is also reduced.

Bitmap Index

It is an index for data analysis and can be created only in the log table. It can be created in all columns except varchar, text, and binary, and also for a single column.
The bitmap index does not only store the key separately but also manage all the data as a bit stream of 0 and 1, so the storage space is small and the operation cost is becoming low.
However, since bitmaps exhibit excellent compression and computational performance in the event of a large number of duplications due to a small number of data types, rather than a large number of data types (cardinality), bear in mind this fact and utilize the indexes. Fortunately, most of the log data stored in Machbase has this high redundancy and, in fact, most bitmap indexes are used. On the other hand, if the probability of having the same value as the time column is very low, it is very effective to reduce the data-set using the DURATION keyword.

RED-BLACK Index

It is a memory index for real-time data retrieval and can be created only on volatile tables. It can be created on all columns of a volatile table and can only be created on a single column.
The volatile table provides a red-black tree optimized for real-time search, and indexes can be installed for all data types. However, one index can be created for one column, and no composite index is provided.

Example:

mach> CREATE VOLATILE TABLE v_table (id INTEGER primary key, name VARCHAR(10));
Created successfully.

mach> CREATE INDEX idx_vrb on v_table (name) INDEX_TYPE REDBLACK;
Created successfuly.

results matching ""

    No results matching ""