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
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