CREATE INDEX IX_PersonContact_FirstNameLastName ON Person.Person(FirstName,LastName)
GO
SELECT BusinessEntityID,FirstName,LastName FROM Person.Person WHERE FirstName+' '+ LastName='Gustavo Achong'
改为
创建新列索引
ALTER TABLE Person.Person ADD Name AS Firstname+''+ lastname
CREATE NONCLUSTERED INDEX IX_PersonContact_Name ON Person.Person(Name)
--用新列查询
SELECT BusinessEntityID,FirstName,LastName FROM Person.Person WHERE name='Gustavo Achong'