Solved

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

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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

777 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