Re: Oracle DATE datatype storage.
Date: 1995/07/25
Message-ID: <1995Jul25.115522.12322_at_newton.ccs.tuns.ca>#1/1
In article <3v0gi8$cv1_at_helios.vanderbilt.edu> Randy Fought <FOUGHTRL_at_CTRVAX.VANDERBILT.EDU> writes:
> Internally Oracle stores the DATE datatype in seven bytes.
>One byte for each of the century, year, month, day, hour, minute
>and second.
>
> We don't care about the hour, minute and second and we have
>many dates to store. This seems quite wasteful to store this in
>seven bytes when it could be done in four. Is there a way to internally
>store the date in four bytes?
>
>Randy
Solution A:
CHAR (4) /* or more specifically VARCHAR2 (4) */
On your form, have non-database fields for entry,
and translate in to characters in your database field upon entry.
Upon query, you will have to translate this database field
into numbers in your non-database fields.
Solution B:
If your that picky about 3 lousy bytes per record,
I think you should be looking elsewhere for your savings.
You should be more concerned with functionality and performance!
James Richard Received on Tue Jul 25 1995 - 00:00:00 CEST