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 -> Cost vs efficiency?

Cost vs efficiency?

From: <sweidanz_at_yahoo.com>
Date: Fri, 12 Oct 2001 10:13:15 +1000
Message-ID: <Yryx7.9$cH1.347@nsw.nnrp.telstra.net>


I was reading some of the messages in asktom.oracle.com discussions and i was wondering about the following:
One of the example was demonstrating the differences between using IN and EXISTS with big and small tables. The only thing that made me confused is that the same query when you run it using EXISTS has a larger cost than when you run it using IN. And apparently by getting the statistics in each run you can see the one with larger cost is more efficient than the one with smaller cost, in terms of number of consistent gets, db block gets and number of rows returned by each step in the execution plan.

My question is what does the cost mean? My understanding is that the optimiser, when using the cost based, will evaluate each execution plan and based on the least cost will determine which one to use. The least cost means that number of block reads/data and indexes will be minimum and in addition to other factors as well. right? So how come larger cost is more efficient than smaller cost query?

I wanted to post this question to Tom but apparently there is no posting messages to the site at present.

thanks for any help,
ZS Received on Thu Oct 11 2001 - 19:13:15 CDT

Original text of this message

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