I was hoping if any of you could be of any help, if I have a huge database with million of entries and all I need is information relating to a specific year (say, 2015), if I use the following query, performance wise will this be best practice or is there another way to have a better query,
CREATE INDEX table1_idx ON table1 (date_column);
SELECT text, date_column
FROM table1
WHERE datepart(yyyy, date_column) = 2015;
Any help relating to this will be highly appreciated.