Encoded vector index

An encoded vector index is a permanent object that provides access to a table. This access is done by assigning codes to distinct key values and then representing those values in a vector.

The size of the vector matches the number of rows in the underlying table. Each vector entry represents the table row number in the same position. The codes generated to represent the distinct key values can be 1 byte, 2 bytes, or 4 bytes in length. The key length depends upon the number of distinct values that need to be represented in the vector. Because of their compact size and relative simplicity, the EVI can be used to process large amounts of data efficiently.

An encoded vector index is used to represent the values stored in a table. However, the index itself cannot be used to directly gain access to the table. Instead, the encoded vector index can only be used to generate either a temporary row number list or a temporary row number bitmap. These temporary objects can then be used with a table probe to specify the rows in the table that the query needs to process.

The main difference in the table probe using an encoded vector index vs. a radix index is that the I/O paging can be asynchronous. The I/O can now be scheduled more efficiently to take advantage of groups of selected rows. Large portions of the table can be skipped over where no rows are selected.

Visual explain icon:

Encoded vector index icon