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

Home -> Community -> Usenet -> c.d.o.misc -> IS IT FASTER TO SELECT RECORDS BY CHARACTER OR BY DATE?

IS IT FASTER TO SELECT RECORDS BY CHARACTER OR BY DATE?

From: chrischee18 <chrischee18_at_gmail.com>
Date: 16 May 2006 20:18:51 -0700
Message-ID: <1147835931.121667.82690@i40g2000cwc.googlegroups.com>


Suppose I have 2 tables. Both have exactly the same data. The only difference
is just the data type for 'period' is different. Table A data type for 'period'
is character. Table B data type for 'period' is date.

Which one is faster?

select * from Table A where period > '20060420' and period < '20060517'

OR

select * from Table B where period > to_date(20060420) and period < to_date(20060517) Received on Tue May 16 2006 - 22:18:51 CDT

Original text of this message

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