0% found this document useful (0 votes)
35 views2 pages

Explain Plan

The document contains an explain plan for a SQL query against an Oracle database. The plan shows the operations involved in executing the query including hash joins, table scans, and index scans. Predicates are identified for filtering and joining tables in the query. The query joins data from four tables to return asset information along with associated book, location, and transaction data.

Uploaded by

Sudha Krishna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views2 pages

Explain Plan

The document contains an explain plan for a SQL query against an Oracle database. The plan shows the operations involved in executing the query including hash joins, table scans, and index scans. Predicates are identified for filtering and joining tables in the query. The query joins data from four tables to return asset information along with associated book, location, and transaction data.

Uploaded by

Sudha Krishna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

<SQL_EXPLAIN_PLAN>

<DATA_DS>
<![CDATA[
Datamodel SQL Explain Plan Report
================================================================
Driver Details:JDBC Driver:Oracle JDBC
driver:weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection:11.2.0
.3.0
DBName:Oracle
DBVersion:Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
SQLQuery:EXPLAIN PLAN SET STATEMENT_ID = 'dm_plan_Q_211127_124140' FOR
SELECT /* QUERY_SRC('datamodel: _datamodel.xdm,dataset:Q') */
DISTINCT a.asset_number ASSET_NUM,
b.book_type_code,
l.segment1||'.'|| l.segment2 ||'.'|| l.segment3 ||'.'|| L.SEGMENT4 LOCATION_L,
L.SEGMENT5 COST_CENT , a. MANUFACTURER_NAME ,
(SELECT MAX(TRANSACTION_DATE_ENTERED )
FROM FA_TRANSACTION_HEADERS
WHERE ASSET_ID = a.ASSET_ID
AND TRANSACTION_HEADER_ID = b.TRANSACTION_HEADER_ID_IN
AND BOOK_TYPE_CODE =b.BOOK_TYPE_CODE
AND TRANSACTION_TYPE_CODE = 'ADDITION' ) GL_DATE

FROM fa_additions_b a,
fa_books b,
fa_distribution_history h,
fa_locations l

WHERE a.asset_id = b.asset_id


AND a.asset_id = h.asset_id
AND h.location_id = l.location_id
SQL Query Timeout: 600
Number of SQL Executions: 1
PLAN_TABLE_OUTPUT
-----------------------------------------------------------------------------------
------------------
Plan hash value: 1890823141

-----------------------------------------------------------------------------------
---------------------------------------
| Id | Operation | Name | Rows |
Bytes |TempSpc| Cost (%CPU)| Time |
-----------------------------------------------------------------------------------
---------------------------------------
| 0 | SELECT STATEMENT | | 75405 |
10M| | 2854 (1)| 00:00:01 |
| 1 | HASH UNIQUE | | 75405 |
10M| 11M| 2854 (1)| 00:00:01 |
|* 2 | HASH JOIN RIGHT OUTER | | 75405 |
10M| | 645 (1)| 00:00:01 |
| 3 | VIEW | VW_SSQ_1 | 7112 |
194K| | 309 (1)| 00:00:01 |
| 4 | HASH GROUP BY | | 7112 |
270K| | 309 (1)| 00:00:01 |
|* 5 | TABLE ACCESS STORAGE FULL | fa_transaction_headers | 7112 |
270K| | 308 (1)| 00:00:01 |
|* 6 | HASH JOIN | | 75405 |
8321K| | 336 (1)| 00:00:01 |
| 7 | VIEW | index$_join$_003 | 18967 |
351K| | 121 (0)| 00:00:01 |
|* 8 | HASH JOIN | | |
| | | |
| 9 | INDEX STORAGE FAST FULL SCAN | FA_BOOKS_U1 | 18967 |
351K| | 48 (0)| 00:00:01 |
| 10 | INDEX STORAGE FAST FULL SCAN | FA_BOOKS_N1 | 18967 |
351K| | 104 (0)| 00:00:01 |
|* 11 | HASH JOIN | | 12873 |
1181K| | 215 (1)| 00:00:01 |
| 12 | TABLE ACCESS STORAGE FULL | fa_additions_b | 3238 |
71236 | | 102 (0)| 00:00:01 |
|* 13 | HASH JOIN | | 12873 |
905K| | 112 (0)| 00:00:01 |
| 14 | TABLE ACCESS STORAGE FULL | fa_locations | 449 |
26491 | | 5 (0)| 00:00:01 |
| 15 | VIEW | index$_join$_004 | 12873 |
163K| | 107 (0)| 00:00:01 |
|* 16 | HASH JOIN | | |
| | | |
| 17 | INDEX STORAGE FAST FULL SCAN| FA_DISTRIBUTION_HISTORY_N2 | 12873 |
163K| | 74 (0)| 00:00:01 |
| 18 | INDEX STORAGE FAST FULL SCAN| FA_DISTRIBUTION_HISTORY_N6 | 12873 |
163K| | 60 (0)| 00:00:01 |
-----------------------------------------------------------------------------------
---------------------------------------

Predicate Information (identified by operation id):


---------------------------------------------------

2 - access("ITEM_1"(+)="A"."ASSET_ID" AND
"ITEM_2"(+)="B"."TRANSACTION_HEADER_ID_IN" AND
"ITEM_3"(+)="B"."BOOK_TYPE_CODE")
5 - storage("TRANSACTION_TYPE_CODE"='ADDITION')
filter("TRANSACTION_TYPE_CODE"='ADDITION')
6 - access("A"."ASSET_ID"="B"."ASSET_ID")
8 - access(ROWID=ROWID)
11 - access("A"."ASSET_ID"="H"."ASSET_ID")
13 - access("H"."LOCATION_ID"="L"."LOCATION_ID")
16 - access(ROWID=ROWID)

]]>
</DATA_DS>
</SQL_EXPLAIN_PLAN>

You might also like