Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Query Performance.

Re: Query Performance.

From: Michael Bialik <michael_bialik_at_my-deja.com>
Date: Thu, 25 Jan 2001 14:28:29 GMT
Message-ID: <94pd62$dg8$1@nnrp1.deja.com>

Hi.

 It's quite possible that the response time improved because all data was

loaded	into memory by the first query. The second query used it without
making	actual I/O to disks.

 Michael.

In article <3a6c8c68.1130582516_at_news.alt.net>,   SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK (Brian Tkatch) wrote:
> I do not the enough about query optimization, but hopefully you can
> help me understand this.
>
> I have a query that is using six tables, including one twice (in the
> count of six), and a view. The view is four tables outer joined with
> NVL() providing a default value. There is one common table between the
> view and the query.
>
> I am timing with 'SET TIMING ON' and then encapsulating each query in
> a 'SELECT COUNT(*) FROM (<query>);'.
>
> The query took approximatly 13 seconds to run. I then took the view
> and mixed it into the query and it took approximately 5 seconds to
> run. I then realized my mistake of leaving the view and its needed
> where clause in the query (unneeded now because I mixed the view in
> directly) and the query took over 9 seconds to run.
>
> I am curious to know why adding extra things to the query (I.E. The
> view) shaved off 3 to 4 seconds.
>
> Note, that when I added the view directly into the table, I obviously
> changed the name of the returned column, to reflect the newly included
> table and not the view.
>
> Brian
>

Sent via Deja.com
http://www.deja.com/ Received on Thu Jan 25 2001 - 08:28:29 CST

Original text of this message

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