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: SQL/DB Tuning Question(Order by)?

Re: SQL/DB Tuning Question(Order by)?

From: Ted Knijff <knijff_at_bigfoot.com>
Date: Fri, 16 Mar 2001 20:13:43 GMT
Message-ID: <3ab2726c.3236744@news.online.de>

Maybe this sounds stupid, but why don't you use the original 3 second query as a subselect and do the order by outside, like this :

select * from (select ..<myoriginal3secondquery> ) order by myfield

Hth.

Ted
On Fri, 16 Mar 2001 00:03:22 -0800, Darryl <djjr_at_ix.netcom.com> wrote:

>I have this query that that joins about 5 tables. Without sorting the
>results with Order by. It returns in about 3 seconds. When I add a
>simple order by clause the query takes about 40 seconds. My first
>thought was that it was sorting using Disk. But autotrace indicated
>that all of the sorting was taking place in memory. I even bumped up
>SORT_AREA_SIZE to 5 meg just in case. I also noticed that one of the
>CPU's on the box(it has 6 CPU's) had a server process that was taking up
>a 100% of the CPU time. The result set is only about 200 rows. Any
>Ideas on whats going on? Is there any way to spread this sorting
>activity over multiple CPU's? None of the documentation of tuning
>sorting seems to cover this situation. Is there any way to speed up
>sorting other that making sure that it happens in memory? Running 8.1.7
>on HU-UX 11.
>
>TIA
>

EMail: knijff_at_bigfoot.com Received on Fri Mar 16 2001 - 14:13:43 CST

Original text of this message

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