What are clustered indexes on table and views.what is difference between indexes on table and indexes on views?
In clustered index the table data is stored sorted on the key value(s) in the index. Clustered indexes give fast access to values frequently searched by range, or that are accessed in sorted order. For example, for a table storing phone book data, an index on LastName, FirstName would be a better candidate for a clustered index than the PhoneNumber column. A search for Ahmad,Iqbal would be able to efficiently retrieve all the matching records, as they are stored "clustered" together.
On the other hand creating a unique clustered index on a view improves query performance because the view is stored in the database in the same way a table with a clustered index is stored. The query optimizer may use indexed views to speed up the query execution. The view does not have to be referenced in the query for the optimizer to consider that view for a substitution.
0 Comments
Please add nice comments or answer ....