Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Timestamp vs. Date Datatype
Hello everybody,
If wa look inside the date and timestamp types :
SQL> select dump(to_date('20051001','yyyymmdd')) from dual;
DUMP(TO_DATE('20051001','YYYYMMD
SQL> select dump(to_timestamp('20051001','yyyymmdd')) from dual;
DUMP(TO_TIMESTAMP('20051001','YYYYMMDD'))
Using timestamp instead of date makes us to waste 12 bytes per field
(indexes and data). All the DB operations I/O, .... are much more efficient
with date fields.
If my data doesn't have fractional second precision, I've never use
timestamp type.
HTH
Enrique
On 10/5/05, Tracy Rahmlow <tracy.rahmlow_at_ampf.com> wrote:
>
> Why did Oracle introduce the timestamp datatype vs. enhancing the date
> datatype's precision? Is everyone migrating to the timestamp datatype? Why
> would anyone want to use the date datatype anymore? It appears to me that
> the timestamp does everything that the date datatype does and more. The
> granularity and computations that can be performed with the timestamp
> datatype appear to be much better. Thanks
> __________________________________________________
>
> NOTE:
> On Aug. 1 my e-mail address changed to tracy.rahmlow_at_ampf.com. Please
begin
> using my new e-mail address starting Aug. 1. E-mails sent to my current
> address, tracy.rahmlow_at_aexp.com, will reach me through Feb. 1, 2006
> __________________________________________________
>
> Tracy Rahmlow | Lead Database Analyst
> Information Systems
> Ameriprise Auto & Home Insurance
>
> AMEX Assurance Company
> IDS Property Casualty Insurance Company
> 3500 Packerland Drive | De Pere, WI 54115-9070
> Office: 920.330.5164 | Fax: 920.330.5350
> tracy.rahmlow_at_ampf.com
> ameriprise.com/autohome <http://ameriprise.com/autohome>
>
> Ameriprise made the following
> annotations on 10/05/05, 06:00:35
>
-- ------------------------------------------------ Enrique -- http://www.freelists.org/webpage/oracle-lReceived on Wed Oct 05 2005 - 09:24:57 CDT