Computed (Expression) Indexes
In creating an index, you can use the COMPUTED BY
clause to specify an expression instead of one or more columns.Computed indexes are used in queries where the condition in a WHERE
, ORDER BY
or GROUP BY
clause exactly matches the expression in the index definition.The expression in a computed index may involve several columns in the table.
Note
|
Expression indexes can also be used as a workaround for indexing computed columns: use the name of the computed column as the expression. |