Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Posts
    1

    Unanswered: What is the best order of columns in an index?

    I have a question for the experts, when putting an index on an ASA 8.0.2 database do you put the most unique field first or least unique.
    For example say you have 3 columns....... location(least unique),style,UPC(most unique).
    Would your index be location,style,upc
    or
    upc,style,location ?

    Thanks,
    Byte

  2. #2
    Join Date
    Nov 2002
    Location
    Switzerland
    Posts
    524
    Yes, it's more powerfull when your're using a SARG in the 3 fields. But a problem exists : if you only know the localisation and the style, the index won't be used...

  3. #3
    Join Date
    Jul 2003
    Posts
    10
    Most unique first, absolutely. I've been burned in the distant past by trying it the other way.

Posting Permissions

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