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: Christian Antognini <Christian.Antognini_at_trivadis.com>
Date: Wed, 5 Oct 2005 16:53:39 +0200
Message-ID: <F2C9CCA71510B442AF71446CAE8AEBAF1344FB@MSXVS04.trivadis.com>


Enrique

>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.

When you store a timestamp you can specify its precision...

SQL> CREATE TABLE t (d DATE, t TIMESTAMP(0));

SQL> INSERT INTO t VALUES (sysdate, localtimestamp);

SQL> SELECT dump(d), dump(t) FROM t;

DUMP(D)



DUMP(T)

Typ=12 Len=7: 120,105,10,5,17,52,26
Typ=180 Len=7: 120,105,10,5,17,52,26

HTH
Chris

New Features Oracle Database 10g Release 2 seminars @ www.trivadis.com

Italiano: Lugano (24-Nov)
Français: Genève (17-Nov)
Deutsch: Hamburg (13-Oct), München (20-Oct), Basel (25-Oct), Frankfurt (27-Oct), 
         Bern (8-Nov), Düsseldorf (23-Nov), Zürich (29-Nov), Stuttgart (13-Dec)
--
http://www.freelists.org/webpage/oracle-l
Received on Wed Oct 05 2005 - 09:56:34 CDT

Original text of this message

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