To build function based index in SQL Server, you can use indexed view (materialized view) or using a computed column.
In this script, I give an exmaple of how to use the computed column to implement a function based index on a table to search through a free formated telephone number column. The basic step is:
1) Create the UDF you want to index on. For a function to be indexable, it must be deterministic.
2) Add a persisted computed column to the table, in context of the function.
3) Create the index on the computed column.
A Normalization Primer
For most DBAs, normalization is an understood concept, a bread and butter bit of knowledge. However, it is not at all unusual to review a database design by a development group for an OLTP (OnLine Transaction Processing) environment and find that the schema chosen is anything but properly normalized. This article by Brian Kelley will give you the core knowledge to data model.
2003-01-13
18,597 reads