Home > Ask the SQL Server Experts > Jeremy Kadlec - Performance Tuning Questions & Answers > Adding non-clustered indexes to SQL Server columns
Ask The SQL Server Expert: Questions & Answers
EMAIL THIS

Adding non-clustered indexes to SQL Server columns

Jeremy Kadlec EXPERT RESPONSE FROM: Jeremy Kadlec

Pose a Question
Other SQL Server Categories
Meet all SQL Server Experts
Become an Expert for this site


Expert advice on database administration
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 14 December 2007
I have a massive customer table. The id is the primary key and thus SQL Server makes a clustered index on that. There is no other index on the table. Can I add an index on fields like age, country and gender to make the results faster. We have pages querying the table with these columns in the WHERE clause a lot, so the table gets updated and written to often. I'm worried that making a non-clustered index on these fields will affect performance. What would you advise?

>
EXPERT RESPONSE
Yes, you can add non-clustered indexes to those additional columns if you are querying (WHERE, ORDER BY, GROUP BY, etc.) or JOINing based on those columns. Just keep in mind that you can only have one clustered index and up to 255 non-clustered indexes.

In SQL Server 2005, you also have the ability to add columns to your indexes to have indexes on columns that were traditionally not indexable, such as columns with the text data type. In addition, at some point adding too many indexes into a database with a large number of insert, update or delete transactions will degrade your performance, so choose wisely.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


RELATED CONTENT
SQL Server performance and tuning
Tips for tuning SQL Server 2005 to improve reporting performance
SQL Server errors, failures and other problems fixed from the trenches
SQL Server database design disasters: How it all starts
Can you shrink your SQL Server database to death?
Parent-child dimensions in SQL Server 2005 with Analysis Services MDX
SQL Server database design disasters: What not to do
Tuning SQL Server performance via memory and CPU processing
Troubleshoot Web service issues in SQL Server 2005 Reporting Services
Ordering the results of a SQL query
Configuring SQL Server with a changed computer name

Jeremy Kadlec - Performance Tuning
View query execution plan in SQL Server with this method
Change collation to SQL Server 2005 after upgrading databases
Is my SQL Server 2000 optimized?
What impact does changing one record have on the database?
Is there a maximum number of sockets that SQL can handle?
Why is my SQL Server frequently corrupted?
How to speed up a composite nonclustered index-based query
What's the best way to page SQL Server data results?
Can I change the date format when moving a flat file to SQL?
Performance differences between Windows and Linux-based databases

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
contiguity  (SearchSQLServer.com)
contiguous  (SearchSQLServer.com)
drilldown  (SearchSQLServer.com)
hashing  (SearchSQLServer.com)
hybrid online analytical processing  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice

HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2005 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts