I store an amendment date field in a lot of my tables. Sometimes I need to use the time portion for my logic and sometimes I just need the date portion. I'm wondering which of the following scenarios is more efficient/best practice:
Storing two columns - one of type DATE and one of type DATETIME - which both represent the same instance in time but in which the DATE column obviously only stores the date portion. When I need to do a comparison on date only I use the DATE column and when I need to do a comparison which includes the time I use the DATETIME column.
Storing one column of type DATETIME and using CONVERT(DATE, Date_Amended_Col) to retrieve the date portion whenever I need it.
Is there a significant overhead using the CONVERT every time? I think the DATE portion is likely to be the one accessed more often so I feel like I would be using CONVERT a lot.
I can't think of any obvious downsides to the second method apart from the fact that both fields need to be updated rather than just one when an amendment is made and I can always use a trigger for that if I feel the need to.
Or is there a better way? Would using a computed column be the same as using the CONVERT every time?
Any thoughts would be appreciated.
Many thanks,
Al