Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: distinct too slow
I don't see the original post. But he can try alter session set sort_area_size to a very big number, say, 200MB and see if it helps.
Posting the explain plan helps.
Yong Huang
yhuang_at_indigopool.com
Spencer <spencerp_at_swbell.net> wrote in message
news:slZj6.223$o81.6336_at_nnrp1.sbc.net...
> "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.
>
> basically, you need to identify the bottleneck, and tune around it.
> i would suggest doing an "explain" on the execution plan for the
> query, and collect a "trace" file. the basic tuning approach is to
> minimize the number of rows (and database blocks) accessed,
> retrieved, sorted, etc. by the query. re-writing the query, or using
> hints, or modifying the schema (e.g. adding an index) are all
> options to consider.
>
>
>
Received on Mon Feb 19 2001 - 09:29:52 CST