0% found this document useful (0 votes)
33 views3 pages

Explain Plan

The document contains an explain plan for a SQL query joining multiple tables. The plan shows the operations needed to execute the query including nested loop joins, index scans, and table accesses. Predicate information is also included describing the join conditions and filters used.

Uploaded by

syedmehar
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)
33 views3 pages

Explain Plan

The document contains an explain plan for a SQL query joining multiple tables. The plan shows the operations needed to execute the query including nested loop joins, index scans, and table accesses. Predicate information is also included describing the join conditions and filters used.

Uploaded by

syedmehar
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/ 3

<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 12c Enterprise Edition Release 12.1.0.2.0 - 64bit
Production
With the Partitioning, Real Application Clusters, Automatic Storage Management,
OLAP,
Advanced Analytics and Real Application Testing options
SQLQuery:EXPLAIN PLAN SET STATEMENT_ID = 'dm_plan_Q_210102_085414' FOR
select /* QUERY_SRC('datamodel: _datamodel.xdm,dataset:Q') */
(nvl(sum(xal.ACCOUNTED_dr) ,0) - nvl(sum(xal.ACCOUNTED_cr),0) ) dist_amt
,(nvl(sum(xal.ENTERED_dr) ,0) - nvl(sum(xal.ENTERED_CR),0) )
dist_amt_ENT

from
xla_ae_lines xal
,xla_ae_headers xah
,gl_import_references imp
,gl_je_lines gjl
,gl_je_headers gjh
,xla_events xe
,xla_transaction_entities xte

where 1=1
and xal.accounting_class_code='RECEIVABLE'
and xal.application_id = xah.application_id
and xal.ae_header_id = xah.ae_header_id
and xal.gl_sl_link_id = imp.gl_sl_link_id
and xal.gl_sl_link_table = imp.gl_sl_link_table
and imp.je_header_id = gjl.je_header_id
and imp.je_line_num = gjl.je_line_num
and imp.je_header_id = gjh.je_header_id
and gjh.je_header_id = gjl.je_header_id
and gjh.status = 'P'
and gjh.actual_flag = 'A'
and xah.application_id = xe.application_id
and xah.event_id = xe.event_id
and xe.entity_id = xte.entity_id
and xe.application_id = xte.application_id
and xte.entity_code = 'TRANSACTIONS'
SQL Query Timeout: 600
Number of SQL Executions: 1
PLAN_TABLE_OUTPUT
-----------------------------------------------------------------------------------
------------------
Plan hash value: 3005522421

-----------------------------------------------------------------------------------
--------------------------------------
| Id | Operation | Name |
Rows | Bytes | Cost (%CPU)| Time |
-----------------------------------------------------------------------------------
--------------------------------------
| 0 | SELECT STATEMENT | |
1 | 139 | 876 (2)| 00:00:01 |
| 1 | SORT AGGREGATE | |
1 | 139 | | |
| 2 | NESTED LOOPS | |
1 | 139 | 876 (2)| 00:00:01 |
| 3 | NESTED LOOPS | |
1 | 139 | 876 (2)| 00:00:01 |
| 4 | NESTED LOOPS | |
1 | 117 | 875 (2)| 00:00:01 |
| 5 | NESTED LOOPS | |
1 | 102 | 874 (2)| 00:00:01 |
| 6 | NESTED LOOPS | |
1 | 87 | 873 (2)| 00:00:01 |
|* 7 | HASH JOIN | |
50 | 1950 | 723 (2)| 00:00:01 |
|* 8 | TABLE ACCESS STORAGE FULL | gl_je_headers |
1802 | 16218 | 32 (0)| 00:00:01 |
| 9 | NESTED LOOPS | |
98519 | 2886K| 691 (2)| 00:00:01 |
| 10 | TABLE ACCESS STORAGE FULL | gl_import_references |
98519 | 2020K| 684 (1)| 00:00:01 |
|* 11 | INDEX UNIQUE SCAN | GL_JE_LINES_U1 |
1 | 9 | 0 (0)| 00:00:01 |
|* 12 | TABLE ACCESS BY INDEX ROWID BATCHED| xla_ae_lines |
1 | 48 | 3 (0)| 00:00:01 |
|* 13 | INDEX RANGE SCAN | XLA_AE_LINES_N4 |
1 | | 2 (0)| 00:00:01 |
| 14 | TABLE ACCESS BY INDEX ROWID | xla_ae_headers |
1 | 15 | 1 (0)| 00:00:01 |
|* 15 | INDEX UNIQUE SCAN | XLA_AE_HEADERS_U1 |
1 | | 0 (0)| 00:00:01 |
| 16 | TABLE ACCESS BY INDEX ROWID | xla_events |
1 | 15 | 1 (0)| 00:00:01 |
|* 17 | INDEX UNIQUE SCAN | XLA_EVENTS_U1 |
1 | | 0 (0)| 00:00:01 |
|* 18 | INDEX UNIQUE SCAN | XLA_TRANSACTION_ENTITIES_U1 |
1 | | 0 (0)| 00:00:01 |
|* 19 | TABLE ACCESS BY INDEX ROWID | xla_transaction_entities |
1 | 22 | 1 (0)| 00:00:01 |
-----------------------------------------------------------------------------------
--------------------------------------

Predicate Information (identified by operation id):


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

7 - access("IMP"."JE_HEADER_ID"="GJH"."JE_HEADER_ID" AND
"GJH"."JE_HEADER_ID"="GJL"."JE_HEADER_ID")
8 - storage("GJH"."STATUS"='P' AND "GJH"."ACTUAL_FLAG"='A')
filter("GJH"."STATUS"='P' AND "GJH"."ACTUAL_FLAG"='A')
11 - access("IMP"."JE_HEADER_ID"="GJL"."JE_HEADER_ID" AND
"IMP"."JE_LINE_NUM"="GJL"."JE_LINE_NUM")
12 - filter("XAL"."ACCOUNTING_CLASS_CODE"='RECEIVABLE')
13 - access("XAL"."GL_SL_LINK_ID"="IMP"."GL_SL_LINK_ID" AND
"XAL"."GL_SL_LINK_TABLE"="IMP"."GL_SL_LINK_TABLE")
15 - access("XAL"."AE_HEADER_ID"="XAH"."AE_HEADER_ID" AND
"XAL"."APPLICATION_ID"="XAH"."APPLICATION_ID")
17 - access("XAH"."EVENT_ID"="XE"."EVENT_ID" AND
"XAH"."APPLICATION_ID"="XE"."APPLICATION_ID")
18 - access("XE"."ENTITY_ID"="ENTITY_ID")
19 - filter("ENTITY_CODE"='TRANSACTIONS' AND
"XE"."APPLICATION_ID"="APPLICATION_ID")

]]>
</DATA_DS>
</SQL_EXPLAIN_PLAN>

You might also like