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: any sql tuning experts?

Re: any sql tuning experts?

From: Luggy <dave_at_oracle-consultant.co.uk>
Date: Wed, 13 Dec 2000 10:26:49 GMT
Message-ID: <917it5$8dg$1@nnrp1.deja.com>

Hi!

Do you expect any rows returned from the statement before the UNION to be the same as rows returned from the statement after the UNION?

If not, you could replace the UNION with a UNION ALL, which will remove the sort. This should speed things up greatly.

However, if you get duplicate rows from the two statements and don't want the duplicates returned, you will have to retain the UNION. If that is the case, you'd have to look at how the sort is being done (memory sorts are far quicker than disk sorts, so try to fit it into SORT_AREA_SIZE). There are many other ways of trying to speed up the statement (many of which could not be ascertained by simply looking at the statement and explain plan), but try the above suggestions first.

Hope this helps,

Dave.

Sent via Deja.com
http://www.deja.com/ Received on Wed Dec 13 2000 - 04:26:49 CST

Original text of this message

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