Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Timestamp vs. Date Datatype

Re: Timestamp vs. Date Datatype

From: Enrique Fernandez-Pampillon <oracle.pampillon_at_gmail.com>
Date: Wed, 5 Oct 2005 16:21:53 +0200
Message-ID: <7ba974f50510050721r7d324140pd30b7835aa89dcab@mail.gmail.com>


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



Typ=13 Len=8: 7,213,10,1,0,0,0,0

SQL> select dump(to_timestamp('20051001','yyyymmdd')) from dual;

DUMP(TO_TIMESTAMP('20051001','YYYYMMDD'))



Typ=187 Len=20: 7,213,10,1,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0

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
>



>


>
> "This message and any attachments are solely for the intended recipient
and
> may contain confidential or privileged information. If you are not the
> intended recipient, any disclosure, copying, use, or distribution of the
> information included in this message and any attachments is prohibited. If
> you have received this communication in error, please notify us by reply
> e-mail and immediately and permanently delete this message and any
> attachments. Thank you."
>
>


>


>
--
------------------------------------------------
Enrique

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Oct 05 2005 - 09:24:57 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US