MSDN article
By default computed columns are not physically stored on disk. They are recalculated every time they are referenced in a query.

To physically store a computed column on disk the column must be marked as PERSISTED.


create table Document
(id int identity(1,1) not null primary key,
Title nvarchar(100) not null,
Content nvarchar(max) null,
Size longint as datalength(content) persisted
)

By marking a computed column as PERSISTED, one can create an index on that column; the index will be deterministic but not precise.
If the computed column is not PERSISTED, the expression defining the column must be deterministic. See this article.

Advertisements