dcsimg
Results 1 to 2 of 2

Thread: Indexes in primary keys

  1. #1
    Join Date
    Nov 2002
    Posts
    261

    Indexes in primary keys

    I have a 3rd party app which had a primary key with about 5 fields. The last field of this was a trantype. This app had a posting process which uses this in it's sql. Ran rather slow. We added an individual index to this field and cut processing down 90%. It almost seemded like sl server was ignoring this index. Is this because it was the last field in the primary key index?

  2. #2
    Join Date
    Feb 2003
    Posts
    1,048
    Exactly right. It was actually much faster for SQL Server to scan the whole table instead of the composite index, so that was what it was doing.

Posting Permissions

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