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

Home -> Community -> Usenet -> c.d.o.server -> Re: distinct too slow

Re: distinct too slow

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Fri, 16 Feb 2001 10:59:35 +0100
Message-ID: <t8q3kqtb16rr54@beta-news.demon.nl>

distinct implies sort.

You need to tune sort_area_size and/or your temporary segment.
The default sort_area_size is 64k which is too small.
Try setting sort_area_size in your session dynamically
(alter session set sort_are_size = <bytes>) and see what happens. 1M (1048576) is usually adequate. For permanent changes edit the init.ora
If that doesn't help post your select, the explain plan and info on the tables involved.

Hth,

Sybrand Bakker, Oracle DBA

"jkl" <jkl_at_novabase.pt> wrote in message news:982314963.524051_at_tubarao.ip.pt...
> How can I speedup a query that uses distinct?
> Tanks.
>
>
Received on Fri Feb 16 2001 - 03:59:35 CST

Original text of this message

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