DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: indexes

  1. #1
    Join Date
    Oct 2011
    Posts
    1

    indexes

    Hello Gurus
    My requirement is

    to quickly select records based on either the ID column or the LAST_NAME or both columns together from my table say 'T'

    For this
    I want to create index on these two columns

    Should I be creating


    1 index specifying both columns, or

    2 indexes (one on each), or

    3 indexes (one for ID + one for last name + both)

    Can you please advice ??

    Thanks in advance

  2. #2
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,555
    I'll start with one on each column.
    Assuming ID column is unique the "two columns together" requirement will be serverd by the unique index on ID.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width