Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: optimize this query
Sreelal wrote:
> in the following qry,
>
> SELECT D_RIF_SALD FROM
> (SELECT DISTINCT D_RIF_SALD FROM GP_TR_CONTR_VAR ORDER BY 1 DESC)
> WHERE ROWNUM <= 3;
>
> Suppose the table contains >1 crore records the query will be slow as
> we are
> using Distinct on a column which repeats . Now it takes > 80 secs
> Any idea to make the query fast
>
> Kalu
Oracle version?
Explain plan?
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Thu Dec 01 2005 - 10:22:17 CST