Index for username/password
- From: "Cecil" <cecilkain0@xxxxxxxxx>
- Date: 28 Dec 2005 05:20:58 -0800
Does this make sense for a logon table:
CREATE TABLE Logon
(
ID INT NOT NULL IDENTITY PRIMARY KEY,
name VARCHAR(15) NOT NULL,
password VARCHAR(15) NOT NULL
)
GO
CREATE UNIQUE INDEX IX_Logon_Name ON Logon(name)
CREATE INDEX IX_Logon_NameAndPassword ON Logon(name,password)
GO
I do want the name to be unique but also will search frequently on both
name & password. Is this how it should be done? I don't fully
understand the difference between placing a single index in name &
password VS one on both name & password.
.
- Follow-Ups:
- Re: Index for username/password
- From: Erland Sommarskog
- Re: Index for username/password
- Prev by Date: Re: Is "name" a keyword?
- Next by Date: Re: MS OLE DB for ODBC with Oracle ODBC source headaches
- Previous by thread: Microsoft Distributed Blank CDs for Sqlserver 2005 and MSDN Library at Launch??
- Next by thread: Re: Index for username/password
- Index(es):
Relevant Pages
|