Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Smarter way to do that
"ciccio" <ciccio_at_ciccio.it> wrote in message
news:449bf31d$1_3_at_x-privat.org...
> Hi
>
> I'd need to select different dates (not times) from a table.
>
> I did a
>
> SELECT DISTINCT TRUNC(MYDATES) FROM MYTABLE
>
> And it gives:
>
> 01/01/2006
> 02/01/2006
> 03/01/2006
>
> and so on as it should, but it is slow, since the table contains a lot
> of records.
>
> It there any smarter and faster way to do that?
>
> TIA
>
> Sandman
>
> Inviato da X-Privat.Org - Registrazione gratuita
http://www.x-privat.org/join.php
You could create a function based index and analyze it
create index mytable_findex on mytable(trunc(mydates)) compute statistics;
Jim Received on Fri Jun 23 2006 - 09:04:51 CDT
![]() |
![]() |