hi.these are 2 different questions:1) Login form with email address and password:you will definitely want to look up the user from the email address as this is the only thing you have to go on. Therefore an index on the email address field of the table will be very useful and probably very necessary.The email address will have a high degree of cardinality (it's nice and specific) so you will get good index use out of it.This is assuming you have a User's / Logins table that looks something like[UserID] INT PRIMARY KEY (autonumber / identity probably), [EmailAddress] VARCHAR(255) NOT NULL (you should have a UNIQUE constraint on here), [PasswordHash] VARBINARY(...) NOT NULL (only store a hash of the password, don't store the real password).........
to check that the user could log in then the only index you would need would be:CREATE UNIQUE NOCLUSTERED INDEX IX_Email_PasswordHash ON <TheTable> ([EmailAddress], [PasswordHash])
Which would give you a good index seek to check someone's credentials (hash the password first in your algorythm of choice)Your 2nd question:quote:
My other question is that I will have another table were users can post multiple times and it will also have an email and password field with an index and a primary key auto increment number will having the same email multiple times in the same table create problems ?