Enhancing performance with index on Computed Columns
Before trying to understand what "an index on a Computed Column" is, it is good to have a basic understanding of what a Computed Column is.
As per MSDN, a Computed Column is computed from an expression that can use other columns in the same table. The expression can be a non-computed column name, constant, function, or any combination of these, connected by one or more operators. The expression cannot be a subquery.
By default, a Computed Column is a virtual column and it is recalculated every time we call it, until we specify it as PERSISTED
in the CREATE TABLE
or ALTER TABLE
commands.
If a Computed Column is defined as being PERSISTED
, it stores the calculated value and those stored values are ...
Get Microsoft SQL Server 2012 Performance Tuning Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.