Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> IS IT FASTER TO SELECT RECORDS BY CHARACTER OR BY DATE?
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