Assuming something like so:
select * from table where DatePart(YEAR, dateColumn) = 2012
Reasonable to have an index on dateColumn?
Edit*
For SQLServer
indexsql server
Assuming something like so:
select * from table where DatePart(YEAR, dateColumn) = 2012
Reasonable to have an index on dateColumn?
Edit*
For SQLServer
Best Answer
Adding an index is definitely a good idea for this. However, DATEPART(YEAR, datecolumn) = 2012 isnt' sargable so it will still do a scan of the index.
If you want it to use the index then you will need to do:
Please note the placement of the >= and the < signs to get the correct bounding box.