Indexes
Indexes are created on columns in tables. The index provides a fast way to look up data based on the values within those columns. There are two types of indexes: clustered index and non-clustered index. A Clustered index is the data of table sorted according to the selected columns .A non- clustered index is just like the index of a book. It contains data sorted so that it’s easy to find, then once found, it points back to the actual page that contains the data. (In other words, it points back to the clustered index)
By default primary key column in a table is a clustered index
CREATE INDEX indexname ON Table (attribute1);
CREATE INDEX ci_ID ON Employee (ID);
Reference Link:
http://www.codeproject.com/Articles/190263/Indexes-in-MS-SQL-Serverhttps://www.simple-talk.com/sql/learn-sql-server/sql-server-index-basics/
No comments:
Post a Comment