Home > SQL Server Tips > Database Administration > SQL Server indexes made handy
SQL Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

DATABASE ADMINISTRATION

SQL Server indexes made handy


Jeremy Kadlec of Edgewood Solutions
09.01.2006
Rating: -2.00- (out of 5)


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


When starting an application, you should be able to identify many of the indexes based on a reasonable set of rules. As the application grows and changes, the indexes should be reviewed to ensure no good index candidates are overlooked. It should be based on how the application is used not based on theory. In the same light, make sure erroneous, duplicate or valueless indexes are removed. This is a precautionary measure to make certain your SQL Server does not have to manage unneeded indexes. In this tip we will identify index recommendations, index creation and index validation.

Commonly Indexed Columns

A common question for many DBAs and developers, relates to the traditional columns recommended for indexes. The general recommendations are:

Additional index considerations should be:

  • The volume of data – With a small number of rows, a table scan may be as fast and cost less than traversing an index to access the data.
  • The selectivity of the data – When the data has low selectivity, i.e. the same data is stored in the column, the value of the index can be minimal.
  • The processing type – With a transaction processing system, the indexes should be minimized to support insertions as fast possible, compared to a reporting system where querying the data in new and different ways will benefit from extensive indexes.
  • SQL Server 2000 indexing dos and don'ts
  • Indexing Q&A: Answers to your common indexing questions

    How can I identify the needed indexes for my application?

    Once the generally recommended indexes are identified, then it is time to determine the best indexes for your application. Below is a list of the SQL Server tools that will help in the identification process.

    [TABLE]

    How do I build my indexes?

    Once the generally recommended indexes are identified, then it is time to determine the bes


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


    RELATED CONTENT
    Microsoft SQL Server Performance Monitoring and Tuning
    Performance implications of transaction log autogrowth in SQL Server
    The short course on how SQL Server really works
    Determining the source of full transaction logs in SQL Server
    Improving SQL Server full-text search performance
    New GROUP BY option provides better data control in SQL Server 2008
    Microsoft SQL Server 2008 Resource Governor primer
    Examining data files when SQL Server tempdb is full
    Testing transaction log autogrowth behavior in SQL Server
    Meeting business needs with SQL Server full-text search
    Using dynamic management views to improve SQL Server index effectiveness

    SQL Server Database Modeling and Design
    Managing the development lifecycle with Visual Studio Team System 2008
    A first look at Visual Studio Team System 2008 Database Edition
    Testing transaction log autogrowth behavior in SQL Server
    Top 10 SQL Server Tips of 2008
    Tutorial: SQL Server indexing tips to improve performance
    Tutorial: Learn SQL Server basics from A-Z
    SQL Server database design disasters: How it all starts
    Can you shrink your SQL Server database to death?
    Physical data storage in SQL Server 2005 and 2008
    SQL Server 2008 data types: Datetime, string, user-defined and more

    Database Administration
    Top load balancing methods for SQL Server
    Performance implications of transaction log autogrowth in SQL Server
    The keys to database backup protection for SQL Server
    Understanding transparent data encryption in SQL Server 2008
    Working with sparse columns in SQL Server 2008
    Determining the source of full transaction logs in SQL Server
    Implementing SQL Server 2008 FILESTREAM functionality
    Improving SQL Server full-text search performance
    Using the OPENROWSET function in SQL Server
    New replication features in SQL Server 2008 and what they mean to you

    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


    t indexes for your application. Below is a list of the SQL Server tools that will help in the identification process.

    [TABLE]

    How can I validate the indexes are beneficial?

    It is great to build indexes, but it is not worth the time to build and maintain indexes without determining if you are benefiting from all of that work. One common scenario you do not want to fall victim to is building indexes that benefit one portion of the application and hinder another portion of the application. One approach to prevent this problem is to build a baseline and as changes are made to the database, run the data collection scripts and compare the results to the baseline. For additional information about baselines, check out this tip on Developing a performance baseline.

    Adding some handy indexes to your environment should be a significant performance boost. The challenge is making sure all generally recommended indexes are covered and then to move on to more advanced ways to determine which indexes to select. If you have taken the time to analyze and build the necessary indexes, be sure to validate the performance improvements with a quantifiable measure.

    About the author: Jeremy Kadlec is the Principal Database Engineer at Edgewood Solutions, a technology services company delivering professional services and product solutions for Microsoft SQL Server. He has authored numerous articles and delivers frequent presentations at regional SQL Server Users Groups and nationally at SQL PASS. He is the author of the Rational Guide to IT Project Management. Jeremy is also the SearchSQLServer.com Performance Tuning expert. Ask him a question here.

    More information on SearchSQLServer.com

  • Tip: Stored procedures: Create and delete constraints and indexes
  • Book Excerpt: Quick steps: 12 indexing tips in 12 minutes
  • Book Excerpt: How to apply indexes in the real world

    Rate this Tip
    To rate tips, you must be a member of SearchSQLServer.com.
    Register now to start rating these tips. Log in if you are already a member.


    Submit a Tip




    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • SQL Server Development - .NET, C#, T-SQL, Visual Basic
    HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




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