I have a table which is never updated and rarely inserted into. I need to optimise this table for rapid querying on a date column and an nvachar(32).
I'm adding Index's to the table, and I'm unsure if it would be best for performance to split the date column up into separate columns e.g. a separate column for year, month and day or just leave the date column as is.
Queries will basically be on the nvarchar column and year column, or may include year, and month, and day.
What I will actually be doing is running a SOUNDEX clause over a surname column and a date column
e.g. something like:
SELECT DISTINCT [Surname]
FROM [dbo].[sometable]
WHERE YEAR(Datecolumn) = 2011 AND SOUNDEX(Surname) = SOUNDEX('smith')
What would be best for performance?