I've been trying to search for awhile regarding how SQL Server handles unique indexes cause will need to create a table named user the table will have a column first_name and last_name our application will have a search feature which will generally search for first_name or last_name but I'm wondering if I define a unique index with first_name and last_name defined on it if I create a statement like
SELECT *
FROM user_table
WHERE first_name LIKE 'a%' OR last_name LIKE 'a%';
Would this statement still hit the unique index I made for which includes the first_name
and last_name
? Or would it be better to define individual indexes for each to optimize the search?