Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Which is th Driving Table ? - basic SQL Qs
'TD_ACCT_MASTER_MOD_TABLE' The query scans this table.
For each accepted row it acquires data from
'GENERAL_ACCT_MAST_TABLE'
by way of index
OF 'IDX_GENERAL_ACCT_MAST_TABLE' (UNIQUE) Each row in the result set is then checked twice (probably a pair of existence clauses) against a table whose name is not in the plan because in both cases the checks are complete through index:
'IDX_SOL_ID_SET_TABLE' The row set that gets through both test is then subject to sorting for an ORDER BY clause.
Regards
Jonathan Lewis
http://www.jlcomp.demon.co.uk
The educated person is not the person
who can answer the questions, but the
person who can question the answers -- T. Schick Jr
One-day tutorials:
http://www.jlcomp.demon.co.uk/tutorial.html
____UK_______April 22nd ____USA_(FL)_May 2nd ____Denmark__May 21-23rd ____Sweden___June ____Finland__September ____Norway___September
Three-day seminar:
see http://www.jlcomp.demon.co.uk/seminar.html
____UK_(Manchester)_May x 2 ____Estonia___June (provisional) ____Australia_June (provisional) ____USA_(CA, TX)_August
The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html
>
> Which is th Driving Table in the following SQL Query ? Why ?
>
> Execution Plan
> ----------------------------------------------------------
> 0 SELECT STATEMENT Optimizer=RULE
> 1 0 SORT (ORDER BY)
> 2 1 FILTER
> 3 2 NESTED LOOPS
> 4 3 TABLE ACCESS (FULL) OF 'TD_ACCT_MASTER_MOD_TABLE'
> 5 3 TABLE ACCESS (BY INDEX ROWID) OF
'GENERAL_ACCT_MAST_
> TABLE'
>
> 6 5 INDEX (UNIQUE SCAN) OF
'IDX_GENERAL_ACCT_MAST_TABL
> E' (UNIQUE)
>
> 7 2 INDEX (UNIQUE SCAN) OF 'IDX_SOL_ID_SET_TABLE'
(UNIQUE)
> 8 2 INDEX (UNIQUE SCAN) OF 'IDX_SOL_ID_SET_TABLE'
(UNIQUE)
>
> Thanks
>
> --
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Jonathan Lewis INET: jonathan_at_jlcomp.demon.co.uk Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Thu Apr 17 2003 - 03:38:38 CDT
![]() |
![]() |