Watch Our YouTube Channel
It is currently Mon Jan 22, 2018 10:26 am
 

All times are UTC



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Mon Apr 18, 2016 7:20 am 
Offline

Joined: Fri Nov 13, 2015 3:56 am
Posts: 460
Clustered Index:
Clustered indexes sort and store the data rows in the table or view based on their key values. These are the columns included in the index definition.
When a table has a clustered index, the table is called a clustered table. If a table has no clustered index, its data rows are stored in an unordered structure called a heap.
Rows in the table are sorted in the exact same order as the clustered index, and the actual table data is stored in the leaf nodes of the clustered index.
This is the “clustering”, or grouping of similar values, which is referred to in the term “clustered” index.
A table can have only one clustered index on it.
Clustered indexes don’t need to store a pointer to the actual row.
A clustered index requires no separate storage than the table storage. It forces the rows to be stored sorted on the index key.
A table with a clustered index is called clustered table. Its rows are stored in a B-Tree structure sorted.
Advantage: The query will run much faster than if the rows were being stored in some random order on the disk

Non Clustered Index:

Nonclustered indexes have a structure separate from the data rows. A nonclustered index contains the nonclustered index key values and each key value entry has a pointer to the data row that contains the key value.
A non-clustered index is useful for columns that have some repeated values.The pointer from an index row in a nonclustered index to a data row is called a row locator.
A table can have more than one Non-Clustered index.
Non clustered indexes store both a value and a pointer to the actual row that holds that value.
A non-clustered index requires separate storage than the table storage to store the index information.
A table without any clustered indexes is called non-clustered table. Its rows are stored in heap structure unsorted.

_________________
Learn Web Development | Latest Technology News |Motivational Quotes


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron