index_object:info()
Since: 3.9.0
Return engine-specific information about an index.
Unlike index_object:stat(), which reports runtime
counters, info() is meant for static details about how an index is organized internally.
For a memcs index, the returned table has a columns field — a map from a column name to
information about how this column is stored in the index:
-
layout— a table describing the column's physical layout:dict(boolean) — whether dictionary encoding is applied to the column.null_rle(boolean) — whether run-length encoding ofnullvalues is applied to the column.
-
compression— a table describing the column's compression:type(string) — the compression type, for examplenoneorlz4.acceleration(number) — present only for compression types that support an acceleration level (for examplelz4); a higher value trades compression ratio for speed.
The columns table includes an entry for every space column that is stored in this
particular index: for the primary index, that's every column of the space; for a secondary
index, that's the index's key parts plus any columns listed in the index's
covers option.
Whether a layout or compression setting requested for a column (via
space_object:format()) is actually
applied to it may depend on the column's nullability, on whether it's a part of a key, and on
engine-internal priority rules — index_object:info() lets you check what was actually
applied.
Parameters:
index_object(index_object) — an object
Returns
engine-specific information about the index
Return type
table
Example:
tarantool> box.space.test.index.pk:info()---- columns:column1:layout:dict: falsenull_rle: falsecompression:type: nonecolumn2:layout:dict: falsenull_rle: truecompression:type: nonecolumn3:layout:dict: truenull_rle: falsecompression:type: lz4acceleration: 1...