I learned that I can index a column like this :
CREATE INDEX idx_lastname
ON Persons (LastName);
The source also says that I can index a combination of indexes like this :
CREATE INDEX idx_pname
ON Persons (LastName, FirstName);
I want to know what happens if I add FirstName
? In what way will the searching in the db be faster? What will happen if I index FirstName
and LastName
seperately? Thanks.