Solved

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

Posted on 2013-10-31
2
203 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

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how the fundamental information of how to create a table.

864 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now