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: cost in explain plan table ?

Re: cost in explain plan table ?

From: Ricky Sanchez <rsanchez_at_more.net>
Date: Fri, 22 Feb 2002 17:36:44 GMT
Message-ID: <3C7681E8.F9A974D7@more.net>


Y-

I have no idea what your first sentence means, but with respect to the second sentence, the meaning of COST is the same within the same session. the CBO will always choose the least cost method. But, since you run a query with one mode versus another, each plan output will give you different cost values. So, how do you compare the two? Take the least cost plan? No, not necessarily.

Tuning by "least cost" will not necessarily give you the best performance result. You need to tune for minimal logical reads, not cost. Logical reads are physical reads plus buffer gets.

And, since you are telling the optimizer to bias toward either throughput (ALL ROWS) or response time (FIRST ROWS), you have to balance a tradeoff. Do you indeed want faster throughput at the expense of response time? Pick one and tune accordingly.

Create your query and test it with realistic data, from the same network location you will use in production. Use something like SQL*PLUS with both timing and auto trace on. Run the actual query and check the end-to-end performance. Don't forget to adjust arraysize to optimize network performance (larger arraysize = better network usage).

Y wrote:
>
> Hi,
> Does the column cost of plan table store the timerons?
>
> Is the meaning of COST the same if I let the OPTIMIZER use ALL_ROWS or
> FIRST_ROWS?
> Thanks in advance!
Received on Fri Feb 22 2002 - 11:36:44 CST

Original text of this message

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