Re: Speed up "order by"

From: Will Kooiman <kooiman_at_interserv.com>
Date: 1995/10/11
Message-ID: <45fq16$2vi_at_data.interserv.net>#1/1


> rz86988_at_mcvax2.d48.lilly.com writes:
> Does anybody know how to speed up the "order by" clause?
>
> The select statement retrieves about 50,000 records and it runs OK, however
> when I add the "order by", it runs over 10 minutes.
>
> What I can do to improve this other than changing the Sort_area_size?
>
> Thanks for any information!
>
> Di Wang
> diw_at_lilly.com
>
>>>>

Without knowing all the details of your table/query/indexes, it's hard to say.

If Oracle has to sort 50,000 rows, it will be slow. But... if you create an index on the sorted columns, the Oracle optimizer "should" recognize this, and it "should" use the index to retrieve the items in sorted order. This is, of course, assuming a lot.

Will. Received on Wed Oct 11 1995 - 00:00:00 CET

Original text of this message