Click here to Skip to main content
15,915,501 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
someone asked a question from indexes that i have a table contains huge records and its user interface , i m having grid and having searching criteria and paging is there . Then , he asked , how many indexes i need to make on that table in the database ? if i m creating non clustered , then how many i need to make and why ?
Posted

It basically depends on how the table is being used.Generally indexes should be present on columns that have one or more of these features :

1.) Frequently used in the search criteria
2.) Used to join other tables
3.) Used as foreign key fields
4.) Of having high selectivity (column which returns a low percentage (0-5%) of rows from a total number of rows on a particular value)

5.) Used in the ORDER BY clause

Hope this helps
 
Share this answer
 
Hi,

Check this ...

Clustered and Non-Clustered Index in SQL 2005[^]

Hope this will help you.


Cheers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900