An encoded vector index (EVI) is an index object that is used by
the query optimizer and database engine to provide fast data access in decision
support and query reporting environments.
EVIs are a complementary alternative to existing index objects (binary
radix tree structure - logical file or SQL index) and are a variation on bitmap
indexing. Because of their compact size and relative simplicity, EVIs provide
for faster scans of a table that can also be processed in parallel.
An EVI is a data structure that is stored as two components:
- The symbol table contains statistical and descriptive information about
each distinct key value represented in the table. Each distinct key is assigned
a unique code, either 1, 2 or 4 bytes in size.
- The vector is an array of codes listed in the same ordinal position as
the rows in the table. The vector does not contain any pointers to the actual
rows in the table.
Advantages of EVIs:
- Require less storage
- May have better build times than radix, especially if the number of unique
values in the column(s) defined for the key is relatively small.
- Provide more accurate statistics to the query optimizer
- Considerably better performance for certain grouping types of queries
- Good performance characteristics for decision support environments.
Disadvantages of EVIs:
- Cannot be used in ordering
- Use for grouping is specialized
- Use with joins always done in cooperation with hash table processing
- Some additional maintenance idiosyncrasies