Hi guys,

Currently if a varlength type (such as String or byte[]) is encountered in
the composite index inline size just defaults to 10, which is almost always
not enough. I am going to change this and implement following changes:

1) For a column of the variable length keep using 10 as the default size in
case of the one-column index. But if the index is composite the default
index size will be calculated as the sum of sizes of all indexed columns.
For example, for the index like (INT, VARCHAR, VARCHAR, INT) default inline
size will be 5 + 10 + 10 + 5 = 30 (5 for each int, 10 for each string).

2) For sql varchar and binary columns with defined length (for example
VARCHAR(XX)) use XX + 3 as default inline size for the column (need 3 extra
bytes for the inner representation of the type).

3) Maximum default index size still will be limited by
IGNITE_MAX_INDEX_PAYLOAD_SIZE, but its default value will be increased to
64. For example for the index (VARCHAR, VARCHAR, VARCHAR, VARCHAR, VARCHAR,
VARCHAR, VARCHAR) default index size will be only 64. Same for the columns
with defined length: by default VARCHAR(100) column will create index only
with size equal to 64.

Please tell if you have any concerns. Update can be found at
https://github.com/apache/ignite/pull/8161

Best regards,
Evgeniy

Reply via email to