Solved

choose between clustered,nonclustered,etc... index in 2012

Posted on 2013-10-31
2
207 Views
Last Modified: 2013-11-01
I am trying to setup indexing in my huge table in 2012 sql server.  How do I decide which type of indexing I use?
0
Comment
Question by:al4629740
2 Comments
 
LVL 10

Assisted Solution

by:Asim Nazir
Asim Nazir earned 150 total points
ID: 39616119
Create a clustered index on table's Identity column i.e. by setting it a Primary key column. It should boost performance of fetching data from table.
0
 
LVL 11

Accepted Solution

by:
Louis01 earned 350 total points
ID: 39616125
Some notes on Clustered and Non-clustered Indexes:
Only one Clustered index allowed per table because data rows can be sorted in one order only.
The only time the data rows in a table are stored in sorted order is when the table contains a clustered index and is called a clustered table.
If a table has no clustered index, its data rows are stored in an unordered structure called a heap.
Nonclustered indexes are in a seperate structure and contains pointers to data rows
Both types of index can be unique.

Regarding which to use, there's no simple recipe. Best is to use the Database Engine Tuning Advisor
0

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question