creating NON CLUSTERED INDEX on table

  • Hi ,

    I have "INDEX" table with the below columns and having 100 millions of records.

    indexid varchar(50) -- this is alphanumeric data that is the reason i have used varchar

    indextype varchar(50)

    insertdate datetime

    with NON CLUSTERED INDEX on insertdate column

    when i run the below query it is taking to much time to return the result.

    select * from INDEX where indexid='xxxxxxxxxxxx' and indextype='xxxxxxxxx'

    here my question is Can i create NON CLUSTERED INDEX on both indexid and indextype columns to improve the performance of the query.

    Note: both indexid and indextype columns may have duplicate data.

    should i create individual NON CLUSTERED INDEX on each column or should i create single composite NON CLUSTERED INDEX on both columns

    please help me on this. Thanks in advance

  • http://sqlinthewild.co.za/index.php/2010/09/14/one-wide-index-or-multiple-narrow-indexes/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks for your reply

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply