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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Explain Plan question

Re: Explain Plan question

From: Jayne Heger <jayne_at_SpamAndChips@sphynx.clara.co.uk>
Date: Mon, 22 Apr 2002 21:07:31 +0000
Message-ID: <1019505248.10339.0@eurus.uk.clara.net>


Daniel Morgan wrote:

> Could you post the three queries with the associated costs?

The Explain Plan costs of the three queries are  

The 1st query, had a cost of 26
second one = 10006
third one = 7347

Below are the actual queries timed.

Thanks

Jayne

Query_number_one
SQL> set timing on
SQL> set time on
14:34:55 SQL> set pause off
14:35:08 SQL> select mod_code
2 from SRS.Table1
3 where mod_code NOT IN
4 (select mod_code
from SRS.Table2);
Press RETURN to Continue

151 rows selected
Elapsed: 00:11:40:94

Query_number_two
SQL> set timing on
SQL> select mod_code
2 from SRS.Table1
3 MINUS
4 select mod_code
5 from SRS.Table2;
Press RETURN to Continue

151 rows selected
Elapsed: 00:00:01:49

Query_number_three
SQL>set timing on
SQL>select SRS.Table1.mod_code
2 from SRS.Table1, SRS.Table2
3 where SRS.Table1.mod_code = SRS.Table2.mod_code (+) 4 and SRS.Table2.mod_code IS NULL;
Press RETURN to Continue

151 rows selected.
Elapsed: 00:00:01:58 Received on Mon Apr 22 2002 - 16:07:31 CDT

Original text of this message

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