Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Date datatype in index - performance
In you example it is converted once. And the lookup can still happen through the
index. The only thing to watch out for is the fact that the date field is really
an date-time field. If you insert using to_date('19980709','YYYYMMDD') always
there is no problem, insert ...,sysdate,.... includes time so the primary key is
seldom unique.
success.
bbristol_at_my-dejanews.com wrote:
> We have tables that have 50-80 million rows in them that have a seven-column
> concatenated primary key.
> Example:
>
> select * from my_table
> where table_date = to_date('19980709','YYYYMMDD');
>
> Wouldn't Oracle simply convert the to_date piece once?
>
> Thank you!
>
> -Bruce Bristol
> bbristol_at_oanservices.com
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Received on Wed Jul 15 1998 - 16:11:29 CDT
![]() |
![]() |