views:

186

answers:

1

In a legacy database (SQL Server 2000), we have a clustered index that looks like this:

CREATE CLUSTERED INDEX [IX_usr] ON [dbo].[usr] 
(
    [uid] ASC,
    [ssn] ASC,
    [lname] ASC
)

The thing is, as far as I know none of these fields are used together in a WHERE clause. Nor is there really any reason to use any of them together. Is there any reason to have a clustered index like this?

+1  A: 

One reason I could think of is if you are using just those fields in many select statements (not necessarily in the where clause), it could serve as a covering index.

For example, if you have lots of queries like this:

SELECT uid, ssn, lname FROM usr WHER uid = x

The query would never actually have to hit the table as all required fields are in the index.

Eric Petroelje
Now that you mention it, that does actually seem to be the case.
Jason Baker