Creating a table
Writing the data
TheStripeLog engine stores all the columns in one file. For each INSERT query, ClickHouse appends the data block to the end of a table file, writing columns one by one.
For each table ClickHouse writes the files:
data.bin— Data file.index.mrk— File with marks. Marks contain offsets for each column of each data block inserted.
StripeLog engine does not support the ALTER UPDATE and ALTER DELETE operations.
Reading the data
The file with marks allows ClickHouse to parallelize the reading of data. This means that aSELECT query returns rows in an unpredictable order. Use the ORDER BY clause to sort rows.
Example of use
Creating a table:INSERT queries to create two data blocks inside the data.bin file.
ClickHouse uses multiple threads when selecting data. Each thread reads a separate data block and returns resulting rows independently as it finishes. As a result, the order of blocks of rows in the output does not match the order of the same blocks in the input in most cases. For example: