-
Indexes
Hi,
I have an application that is experiencing performance issues. I am in the process of putting indexes on the tables that are primarily being used for reads and joins.
To simplify matters, I will use a generic example:
If I have an table with the following columns
tableA
custid int
fname varchar(50)
lname varchar(50)
address varchar(100)
pcode char(7)
telnum char(10)
faxnum char(10)
email char(100)
and I put an nonclustered, non unique index on
custid, fname, lname,pcode and telnum
Will SQL Server use the index if I have a query (or a join) that uses only part of the index
i.e. the where clause uses only custid, fname, lname.
Or should I create separate indexes.
Thanks in advance,
-
Depends on column order in the index and in the query. I'll create separate ones unless need cover index.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|