Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Questions about indexes ?

Status
Not open for further replies.

LDL30

IS-IT--Management
Mar 31, 2003
14
DE
Hi,

I have few questions about indexes.

For example : I have one table with some user data, primary key is on field userID and I do not have any other indexes there.

Often I am running some stored procedures where I have something like :

select count(username) from members where username=@to

Will it help if I create one index on username (varchar type) ?

This is just one example, but I have a lot of selects where I use not primary key
fields in condition but I am not sure will it make performaces better if I create
indexes on all or most of my fields in "where" parts.


Thanks,
Oliver

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top