0% found this document useful (0 votes)
180 views

Explain Plan

The SQL query joins data from multiple tables to retrieve financial data for reporting. It performs several joins and filters, including joining the general ledger, journal headers, lines and periods tables. It also filters on code combination segments and date ranges. The query is estimated to return over 60,000 rows by performing these joins and filters in an efficient manner using hash joins, full table scans and filters.

Uploaded by

balasuk
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)
180 views

Explain Plan

The SQL query joins data from multiple tables to retrieve financial data for reporting. It performs several joins and filters, including joining the general ledger, journal headers, lines and periods tables. It also filters on code combination segments and date ranges. The query is estimated to return over 60,000 rows by performing these joins and filters in an efficient manner using hash joins, full table scans and filters.

Uploaded by

balasuk
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/ 4

<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,
Oracle Label Security,
OLAP, Advanced Analytics, Oracle Database Vault and Real Application Testing
SQLQuery:EXPLAIN PLAN SET STATEMENT_ID = 'dm_plan_Q_180110_061315' FOR
select /* QUERY_SRC('datamodel: _datamodel.xdm,dataset:Q') */
gcc.segment1 "CompanyCode",
gcc.segment4 "Cost_Center",
gl_flexfields_pkg.get_description_sql(led.CHART_OF_ACCOUNTS_ID, 4, gcc.segment4)
"Dept_Description",
Calnd.FISCAL_YEAR_NUMBER "Fiscal_Year",
Calnd.FISCAL_PERIOD_NUMBER "Period",
jh.period_name "period_name",
gcc.segment2 "Account",
gcc.segment3 "Function",
gcc.segment5 "Project",
gl_flexfields_pkg.get_description_sql(led.CHART_OF_ACCOUNTS_ID, 2, gcc.segment2 )
"Account_Description",
led.currency_code "Currency",
(nvl(jl.accounted_dr,0)) - (nvl(jl.accounted_cr,0)) "Amount",
translate( jh.description, CHR(10) || CHR(13) , ' ' ) "Header_Description",
jl.description "Line_Description",
jh.name "Journal_Name",
jh.je_source "Journa_Source",
DECODE(replace(translate(jh.JE_CATEGORY ,'1234567890','##########'),'#'),NULL,null,
jh.JE_CATEGORY ) "JE_CATEGORY"

FROM gl_ledgers led,


gl_je_headers jh,
gl_je_lines jl,
gl_code_combinations gcc,
GL_FISCAL_DAY_V Calnd

WHERE led.ledger_id = jh.ledger_id


AND jh.je_header_id = jl.je_header_id
AND jl.period_name = Calnd.FISCAL_PERIOD_NAME
AND jl.code_combination_id = gcc.code_combination_id
AND gcc.code_combination_id in (
Select gccx.code_combination_id from gl_code_combinations gccx where
(gccx.segment1 in (null) or least( null) is null )
And (gccx.segment4 in (null) or least( null) is null )
AND (gccx.segment2 in (null) or least( null) is null )
AND gccx.segment2 in ('459003', '459004', '459005', '459006', '459007',
'459008', '459009', '459010', '459011', '459012', '459013', '459014',
'459015', '475010', '484010', '512010',
'531001', '811010', '811020', '812010', '812011', '812012',
'812013', '812020', '812021', '812022', '812023', '483010'
)
and gccx.segment1 in ('REDD', 'REIM', 'YRCF', 'NPME')
)
AND Calnd.ENTERPRISE_ID = 1
AND (trunc(Calnd.Report_Date) between trunc(to_date('01-'||null ,'dd-mm-yyyy'))
and trunc((to_date('01-'|| null ,'dd-mm-yyyy' ))))

order by "Fiscal_Year", "Period", "CompanyCode", "Cost_Center", "Account"


SQL Query Timeout: 600
Number of SQL Executions: 1
PLAN_TABLE_OUTPUT
-----------------------------------------------------------------------------------
------------------
Plan hash value: 715331498

-----------------------------------------------------------------------------------
---------------------------------
| Id | Operation | Name | Rows | Bytes
|TempSpc| Cost (%CPU)| Time |
-----------------------------------------------------------------------------------
---------------------------------
| 0 | SELECT STATEMENT | | 6133K|
1532M| | 418K (1)| 00:00:17 |
| 1 | SORT ORDER BY | | 6133K|
1532M| 1597M| 418K (1)| 00:00:17 |
|* 2 | FILTER | | |
| | | |
| 3 | MERGE JOIN | | 6133K|
1532M| | 95251 (1)| 00:00:04 |
| 4 | SORT JOIN | | 293K|
70M| 147M| 95184 (1)| 00:00:04 |
|* 5 | HASH JOIN | | 293K|
70M| | 80358 (1)| 00:00:04 |
| 6 | INDEX FULL SCAN | GL_PERIOD_SETS_U1 | 1 | 5
| | 1 (0)| 00:00:01 |
|* 7 | HASH JOIN | | 293K|
68M| | 80356 (1)| 00:00:04 |
| 8 | TABLE ACCESS STORAGE FULL | GL_PERIODS | 72 | 2592
| | 3 (0)| 00:00:01 |
|* 9 | HASH JOIN | | 293K|
58M| | 80352 (1)| 00:00:04 |
| 10 | TABLE ACCESS STORAGE FULL | GL_LEDGERS | 4 | 68
| | 3 (0)| 00:00:01 |
|* 11 | HASH JOIN | | 293K|
53M| 6032K| 80349 (1)| 00:00:04 |
| 12 | TABLE ACCESS STORAGE FULL | GL_JE_HEADERS | 49001 |
5455K| | 650 (1)| 00:00:01 |
|* 13 | HASH JOIN | | 298K|
22M| | 78119 (1)| 00:00:04 |
| 14 | JOIN FILTER CREATE | :BF0000 | 298K|
22M| | 78119 (1)| 00:00:04 |
|* 15 | TABLE ACCESS STORAGE FULL| GL_CODE_COMBINATIONS | 6466 |
208K| | 2126 (1)| 00:00:01 |
| 16 | JOIN FILTER USE | :BF0000 | 8715K|
382M| | 75967 (1)| 00:00:03 |
|* 17 | TABLE ACCESS STORAGE FULL| GL_JE_LINES | 8715K|
382M| | 75967 (1)| 00:00:03 |
|* 18 | FILTER | | |
| | | |
|* 19 | SORT JOIN | | 92 | 1012
| | 40 (8)| 00:00:01 |
|* 20 | INDEX STORAGE FAST FULL SCAN | FND_CAL_DAY_U1 | 92 | 1012
| | 39 (6)| 00:00:01 |
-----------------------------------------------------------------------------------
---------------------------------

Predicate Information (identified by operation id):


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

2 - filter(TRUNC(TO_DATE('01-','dd-mm-yyyy'))>=TRUNC(TO_DATE('01-','dd-mm-
yyyy')))
5 - access("GLP"."PERIOD_SET_NAME"="GLPS"."PERIOD_SET_NAME")
7 - access("JL"."PERIOD_NAME"="GLP"."PERIOD_NAME")
9 - access("LED"."LEDGER_ID"="JH"."LEDGER_ID")
11 - access("JH"."JE_HEADER_ID"="JL"."JE_HEADER_ID")
13 - access("JL"."CODE_COMBINATION_ID"="GCCX"."CODE_COMBINATION_ID")
15 - storage(("GCCX"."SEGMENT2"='459003' OR "GCCX"."SEGMENT2"='459004' OR
"GCCX"."SEGMENT2"='459005' OR
"GCCX"."SEGMENT2"='459006' OR "GCCX"."SEGMENT2"='459007' OR
"GCCX"."SEGMENT2"='459008' OR
"GCCX"."SEGMENT2"='459009' OR "GCCX"."SEGMENT2"='459010' OR
"GCCX"."SEGMENT2"='459011' OR
"GCCX"."SEGMENT2"='459012' OR "GCCX"."SEGMENT2"='459013' OR
"GCCX"."SEGMENT2"='459014' OR
"GCCX"."SEGMENT2"='459015' OR "GCCX"."SEGMENT2"='475010' OR
"GCCX"."SEGMENT2"='483010' OR
"GCCX"."SEGMENT2"='484010' OR "GCCX"."SEGMENT2"='512010' OR
"GCCX"."SEGMENT2"='531001' OR
"GCCX"."SEGMENT2"='811010' OR "GCCX"."SEGMENT2"='811020' OR
"GCCX"."SEGMENT2"='812010' OR
"GCCX"."SEGMENT2"='812011' OR "GCCX"."SEGMENT2"='812012' OR
"GCCX"."SEGMENT2"='812013' OR
"GCCX"."SEGMENT2"='812020' OR "GCCX"."SEGMENT2"='812021' OR
"GCCX"."SEGMENT2"='812022' OR
"GCCX"."SEGMENT2"='812023') AND ("GCCX"."SEGMENT1"='NPME' OR
"GCCX"."SEGMENT1"='REDD' OR
"GCCX"."SEGMENT1"='REIM' OR "GCCX"."SEGMENT1"='YRCF'))
filter(("GCCX"."SEGMENT2"='459003' OR "GCCX"."SEGMENT2"='459004' OR
"GCCX"."SEGMENT2"='459005' OR
"GCCX"."SEGMENT2"='459006' OR "GCCX"."SEGMENT2"='459007' OR
"GCCX"."SEGMENT2"='459008' OR
"GCCX"."SEGMENT2"='459009' OR "GCCX"."SEGMENT2"='459010' OR
"GCCX"."SEGMENT2"='459011' OR
"GCCX"."SEGMENT2"='459012' OR "GCCX"."SEGMENT2"='459013' OR
"GCCX"."SEGMENT2"='459014' OR
"GCCX"."SEGMENT2"='459015' OR "GCCX"."SEGMENT2"='475010' OR
"GCCX"."SEGMENT2"='483010' OR
"GCCX"."SEGMENT2"='484010' OR "GCCX"."SEGMENT2"='512010' OR
"GCCX"."SEGMENT2"='531001' OR
"GCCX"."SEGMENT2"='811010' OR "GCCX"."SEGMENT2"='811020' OR
"GCCX"."SEGMENT2"='812010' OR
"GCCX"."SEGMENT2"='812011' OR "GCCX"."SEGMENT2"='812012' OR
"GCCX"."SEGMENT2"='812013' OR
"GCCX"."SEGMENT2"='812020' OR "GCCX"."SEGMENT2"='812021' OR
"GCCX"."SEGMENT2"='812022' OR
"GCCX"."SEGMENT2"='812023') AND ("GCCX"."SEGMENT1"='NPME' OR
"GCCX"."SEGMENT1"='REDD' OR
"GCCX"."SEGMENT1"='REIM' OR "GCCX"."SEGMENT1"='YRCF'))
17 - storage(SYS_OP_BLOOM_FILTER(:BF0000,"JL"."CODE_COMBINATION_ID"))
filter(SYS_OP_BLOOM_FILTER(:BF0000,"JL"."CODE_COMBINATION_ID"))
18 - filter("REPORT_DATE"<="GLP"."END_DATE")
19 - access("REPORT_DATE">="GLP"."START_DATE")
filter("REPORT_DATE">="GLP"."START_DATE")
20 - storage(TRUNC(INTERNAL_FUNCTION("REPORT_DATE"))>=TRUNC(TO_DATE('01-','dd-mm-
yyyy')) AND
TRUNC(INTERNAL_FUNCTION("REPORT_DATE"))<=TRUNC(TO_DATE('01-','dd-mm-
yyyy')) AND "ENTERPRISE_ID"=1)
filter(TRUNC(INTERNAL_FUNCTION("REPORT_DATE"))>=TRUNC(TO_DATE('01-','dd-mm-
yyyy')) AND
TRUNC(INTERNAL_FUNCTION("REPORT_DATE"))<=TRUNC(TO_DATE('01-','dd-mm-
yyyy')) AND "ENTERPRISE_ID"=1)

Note
-----
- this is an adaptive plan

]]>
</DATA_DS>
</SQL_EXPLAIN_PLAN>

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy