Это то ?
Oracle SQL Explain Plan 2 Ноябрь 2009 г. 14:47:57 GMT+03:00
Target:
KNTROICK
Version: Oracle 9.2.0.7.0
Database: KNTROICK
Schema: SUPERMAG
Date: 02.11.2009 3:00:00
SQL Statement:
SELECT sp.specitem, sc.doctype, sc.docid, sc.specitem specitem_src,
sc.itemprice, sc.itempricenotax
FROM smspec sp, smspec sc
WHERE sp.doctype = :b1
AND sp.docid = :b2
AND (:b3 = '0'
OR nvl(sp.itemprice, 0) = 0)
AND sc.article = sp.article
AND sc.doctype || sc.docid = (SELECT substr(max(to_char(d1.createdat,
'YYYYMMDD') || d1.doctype || d1.id),
9)
FROM smspec s1, smdocuments d1
WHERE s1.doctype = d1.doctype
AND s1.docid = d1.id
AND d1.createdat <= :b4
AND d1.docstate = 3
AND d1.doctype IN ('WI', 'PO')
AND d1.opcode IN (0, 13)
AND s1.article = sp.article
AND d1.locationto IN (SELECT id
FROM ttshoplist)
AND (d1.doctype != :b1
OR d1.id != :b2))
AND sc.specitem IN (SELECT max(s3.specitem)
FROM smspec s3
WHERE s3.doctype = sc.doctype
AND s3.docid = sc.docid
AND s3.article = sc.article)
Optimizer Mode Used:
COST ALL ROWS (optimizer: CHOOSE)
Total Cost:
162
Execution Steps:
Step # Step Name
20 SELECT STATEMENT
19 FILTER
18 SORT [GROUP BY]
17 FILTER
13 NESTED LOOPS
11 NESTED LOOPS
8 NESTED LOOPS
5 NESTED LOOPS
2 SUPERMAG.SMSPEC TABLE ACCESS [BY INDEX ROWID]
1 SUPERMAG.SMCSPEC_DISPLAYPOS INDEX [RANGE SCAN]
4 INLIST ITERATOR
3 SUPERMAG.SMSPEC_ART INDEX [RANGE SCAN]
7 SUPERMAG.SMDOCUMENTS TABLE ACCESS [BY INDEX ROWID]
6 SUPERMAG.SMCDOCUMENTS_PK INDEX [UNIQUE SCAN]
10 SUPERMAG.SMSPEC TABLE ACCESS [BY INDEX ROWID]
9 SUPERMAG.SMSPEC_ART INDEX [RANGE SCAN]
12 SUPERMAG.TTCSHOPLIST_PK INDEX [UNIQUE SCAN]
16 SORT [AGGREGATE]
15 SUPERMAG.SMSPEC TABLE ACCESS [BY INDEX ROWID]
14 SUPERMAG.SMSPEC_ART INDEX [RANGE SCAN]
Step # Description Est. Cost Est. Rows Returned Est. KBytes Returned
1 This plan step retrieves one or more ROWIDs in ascending order by scanning the B*-tree index SMCSPEC_DISPLAYPOS. 3 7 --
2 This plan step retrieves rows from table SMSPEC through ROWID(s) returned by an index. 4 1 0,032
3 This plan step retrieves one or more ROWIDs in ascending order by scanning the B*-tree index SMSPEC_ART. 2 26 0,482
4 This plan step loops through the query's IN list predicate, executing its child step for each value found.
5 This plan step joins two sets of rows by iterating over the driving, or outer, row set (the first child of the join) and, for each row, carrying out the steps of the inner row set (the second child). Corresponding pairs of rows are tested against the join condition specified in the query's WHERE clause. 6 3 0,152
6 This plan step retrieves a single ROWID from the B*-tree index SMCDOCUMENTS_PK. -- 1 --
7 This plan step retrieves rows from table SMDOCUMENTS through ROWID(s) returned by an index. 1 1 0,021
8 This plan step joins two sets of rows by iterating over the driving, or outer, row set (the first child of the join) and, for each row, carrying out the steps of the inner row set (the second child). Corresponding pairs of rows are tested against the join condition specified in the query's WHERE clause. 9 1 0,072
9 This plan step retrieves one or more ROWIDs in ascending order by scanning the B*-tree index SMSPEC_ART. 2 144 --
10 This plan step retrieves rows from table SMSPEC through ROWID(s) returned by an index. 146 1 0,036
11 This plan step joins two sets of rows by iterating over the driving, or outer, row set (the first child of the join) and, for each row, carrying out the steps of the inner row set (the second child). Corresponding pairs of rows are tested against the join condition specified in the query's WHERE clause. 155 1 0,108
12 This plan step retrieves a single ROWID from the B*-tree index TTCSHOPLIST_PK. -- 4 084 51,848
13 This plan step joins two sets of rows by iterating over the driving, or outer, row set (the first child of the join) and, for each row, carrying out the steps of the inner row set (the second child). Corresponding pairs of rows are tested against the join condition specified in the query's WHERE clause. 155 28 3,391
14 This plan step retrieves one or more ROWIDs in ascending order by scanning the B*-tree index SMSPEC_ART. 3 1 --
15 This plan step retrieves rows from table SMSPEC through ROWID(s) returned by an index. 4 1 0,021
16 This plan step accepts a row set (its only child) and returns a single row by applying an aggregation function. -- 1 0,021
17 This plan step accepts multiple sets of rows. Rows from the first set are eliminated using the data found in the second through n sets.
18 This plan step accepts a set of rows from its child node, and sorts them into groups based on the columns specified in the query's GROUP BY clause. 158 1 0,121
19 This plan step accepts a set of rows from its child node, eliminates some of them, and returns the rest.
20 This plan step designates this statement as a SELECT statement.