Re: Sorted index includes the cache key and the affinity key columns. Why?

2017-10-27 Thread Vladimir Ozerov
Andrey, In general case we do not store any values in the index. Essentially index is a sequence of so-called "links" (i.e. pointers) to real data rows, sorted in accordance with indexed column. When two rows have the same indexed value, we need to sort them somehow still. This is where key and

Sorted index includes the cache key and the affinity key columns. Why?

2017-10-25 Thread Andrey Kornev
Hello, Ignite adds the cache key and optionally the affinity key (if defined) as two last columns of all user-defined indexes (line 301 in H2TableDescriptor). For example, given a user index salary_idx including a single field "salary", the actual index is going to look like this: CREATE