fredericofonseca
IS-IT--Management
Hi all,
Quick question for those of you that work with datawarehouses.
Would there be any situation where it would be advisable to store a date (just date, not time) as a integer, and if so why would that be. Please do not consider the possibility of having a primary key of a date table to be the corresponding date converted to a integer. I'm only interested on cases like storing a effective date or a payment date as a integer versus a date type.
Tables with up to 500m records, with 4-5 date fields
Storage should not be of importance as date datatime takes only 3 bites versus 4 bites that a integer would require.
This in SQL server 2008 R2 - no consideration required for portability to previous versions.
thanks
Regards
Frederico Fonseca
SysSoft Integrated Ltd
FAQ219-2884
FAQ181-2886
Quick question for those of you that work with datawarehouses.
Would there be any situation where it would be advisable to store a date (just date, not time) as a integer, and if so why would that be. Please do not consider the possibility of having a primary key of a date table to be the corresponding date converted to a integer. I'm only interested on cases like storing a effective date or a payment date as a integer versus a date type.
Tables with up to 500m records, with 4-5 date fields
Storage should not be of importance as date datatime takes only 3 bites versus 4 bites that a integer would require.
This in SQL server 2008 R2 - no consideration required for portability to previous versions.
thanks
Regards
Frederico Fonseca
SysSoft Integrated Ltd
FAQ219-2884
FAQ181-2886