SlideShare a Scribd company logo
Oltmans Construction
Jamal Aburrub
Projects Reports Team Lead
CMiC
Rachel Barker
Business IntelligenceAnalyst
SQL Performance Tuning and New Features in Oracle 19c
SQL Performance Tuning and New Features in Oracle 19c
AGENDA
New Features in JasperStudio
What's New in R12
The Dynamically Different 19c Optimizer
Finding the Bottlenecks in Your Code
Getting the Best From the Adaptive Optimizer
Q & A
WHAT IF I CAN DO A LOT FROM JasperStudio
Create and Compile a Project
Project Properties and Version Compatibilities
Connect to JasperServer
Direct Update on the Server
NEW USER INTERFACE AND DESIGN VIEW (JasperStudio 7.5)
Repository Explorer
ProjectExplorer
New Sourcelook and
Feel
New Preview Page
Createyourown
compositeelements
PropertiesTabs
ReportStats
PROJECT EXPLORER
Projectswith Independent Properties andContents
Compatability
Import
Export
ExportFiles To
Build Project
REPOSITORY EXPLORER
THE SOURCE TAB
Color Coded
Easy Search and
Replace
Outline for Easy
Navigation
THE PREVIEW TAB
Parameters as a List
More Output Formats
All in One Area
ReportOutput
Stats
FillingTime:
CompilationTime:
OBJECT PROPERTIES WINDOW IS NOW ORGANIZED BY TABS
Object Properties
Window Now
Separated By Tab
Appearance Borders Text Field Inheritance Hyperlink Advanced
NO NEED FOR CONDITIONAL STYLES TRY THE NEW DYNAMIC PROPERTIES
Show conditional amounts in different color (Negative
Amounts, Cost Amount greater than the Budget Amount, etc.
FONT SCALING IT IS A LIFE SAVER
Employee Job Title
Richard Baker Business Intelligence Analy
Employee Job Title
Richard Baker Business Intelligence Analyst
EXCEL OUTPUT THE WAY I WANT IT!
Spreadsheet
Layout
Makes Excel Output Easy
XLS
Advanced
Properties
More Control on XLS Output
CSV
Advanced
Properties
More Control on CSV Output
WORKING WITH SPREADSHEETLAYOUT
Columns must be of the same size
Columns should be aligned at the
same verticalposition
Add one column
per element
Elementcan be a
fieldor a framewith
multipleobjects.
Auto Resize
Remove a field or a frame from the
column
ADVANCED XLS PROPERTIES
Adds tags
that define
how data is
exported to
Microsoft
format
Yes/No (Hide or
Show)
Static Text
Database
Column
Expression
SAVE SPACE BY SHORTING THE FRAMES AROUND LARGER OBJECTS
VS
JASPERSOFT® USER GUIDES
Help!
Jaspersoft® Studio User Guide
TIBCO JasperReports Server Ultimate
Guide
TIBCO JasperReports Server REST API
Reference
Implicitlyregisters start and end time of each report that runs from the UIConsole.
Then it will register the report in da.SYS_PROGRAM_AUDITevery time the report query
is run.
Explicit registrationin SYS_DEBUG_LOG using Report packages
use the following pl/sql Before_Report
da.dbk_sys_audit.Jasper_Report_Begin_Query('APCVD');
T_Step := DBK_JSR_REPORTS.Set_Step_Debug(G_Package_Name, T_Procedure_Name,
'A: Context Variables');
Then it will register the debugmessages in da.Sys_Debug_Log
CMiC developed it's own Auditutilities, two of which are used in
Reports (Securityissues):
FROM THE DESK OF JIM ORIOTIS
SYS_PROGRAM_AUDIT TABLE
select a.syspa_oraseq
,to_char(a.syspa_date,'DD-MON-YYYY HH24:MI:SS') syspa_date
,a.syspa_sessionid
,a.syspa_program_type
,a.syspa_program_name
,a.syspa_action
,a.syspa_user
From da.SYS_PROGRAM_AUDIT a
Where a.syspa_program_type = 'Report'
And a.syspa_date > trunc(sysdate, 'MONTH')
order by a.syspa_program_name,a.syspa_date
,a.syspa_oraseqdesc;
What has changed in CMiC R12?
WHAT HAS CHANGED IN R12
Client/Server Connection in Oracle
FORMS & REPORTS
V10
Stateless Sessions in ADF/JSP
Conversion to Jasper Reports
V10X
Stateless Sessions in ADF/JSP
Conversionto Jasper Server 6.3
R12
Upgrade to Jasper Server 7.5
R12Patch14-0
STATEFUL VS STATELESS SESSIONS
PRAGMA SERIALLY REUSABLE REINITIATE YOUR PACKAGE EVERYRUN
Initiating variables globally in
packages is not advised with
stateless connections
PRAGMA SERIALLY REUSABLE REINITIATE YOUR PACKAGE EVERYRUN
PACKAGE serial_package
AS
PRAGMA SERIALLY_REUSABLE;
CURSOR equip_aco_curIS
SELECT embch_bch_num
, embch_name
, embch_date
, ...
FROM da.emequipment e
, da.emcomponent c
, da.emtrancode t
, da.wgtconv w
, da.emctrl l
, da.emtranpost p
, da.embatch b
...
TYPE equip_aco_aatIS TABLE OF
equip_aco_join_cur%ROWTYPE
INDEX BY PLS_INTEGER ;
FUNCTION F_Get_Equip_ACO_Bch_Info(
p_comp_code VARCHAR2
, p_bch_num NUMBER )
RETURN EQUIP_ACO_AAT ;
END serial_package;
THE DYNAMICALLY DIFFERENT ADAPTIVE OPTIMIZER & OTHER NEW FEATURES IN 19C
Adaptive Query
Optimization
Adaptive Plans
Join Methods
Parallel Distribution
Methods
Bitmap Pruning
Adaptive Statistics
Dynamic Statistics
Automatic
Reoptimization
SQL Plan Directives
SQL Quarantine
Optimizer Statistics
Advisor
Hint Reporting in
DBMS_XPLAN
New Initialization
Parameters for Hints
Oracle. (2019). The Optimizer in Oracle Database
19c [White Paper].
HOW DO
WE ADD
VALUE TO
OUR
REPORTS?
Consolidate Multiple Reports into One Report
Add Other Datasources: External Databases, APIs, Files
Include Related Documents
All the InformationIn One Place
Consolidate totalsby passing values from Subreports
to the Main Reports
Highlight critical data with conditional formatting
Assist in Analyzing the Data
Make it easy! EliminateUnnecessary Params & Fields
Make it fast! Know your execution plan & SQL tune it
Don't Waste Their Time
FINDING THE
BOTTLENECKS
IN YOUR CODE
Performance problems can occur when
consolidating reports and adding data from more
places.
Resolving the problem starts with understanding
the execution plan.
READING EXECUTION PLANS IT'S NOT ROCKET SCIENCE IF YOU BREAK IT DOWN
Go to theFirst
Unvisited Leaf
Start at the Depth
Go to the Parent
of the First Leaf
Followthe
IndentationsOutward
Go to theNext
Unvisited Leaf
WHAT DO WE WANT FROM OUR EXECUTION PLAN?
Accurate
Row
Estimates
Efficient
Access Paths
Minimal I/O
Quick
Operation
Steps
Better
Performance
Execution Plan
Shows optimizer decisions
Shows Key Performance Indicators for the SQL
Has a hierarchal tree format
Parent-child relationships are determined by the indentations
PERFORMANCE TUNING DEMO CLIENTS TABLE
COMPANY_CODE
VARCHAR2(10)
CLIENT_CODE
VARCHAR2(30)
CITY
VARCHAR2(100)
REGION_CODE
VARCHAR2(100)
COUNTRY_CODE
VARCHAR2(100)
CLIENT_ID
(NUMBER)
ABC CITY OF LOS
ANGELES
LOS ANGELES CA U.S.A. 1
XYZ CITY OF NEW YORK NEW YORK NY U.S.A. 2
...
TABLE: CLIENTS_TN
PERFORMANCE TUNING DEMO EXECUTION PLAN 1
PERFORMANCE TUNING DEMO EXECUTION PLAN 2
END-TO-END APPLICATION TRACING CAN GIVE YOU DIRECTION
How Do I
Know If It's My
SQL???
END-TO-END
APPLICATION
TRACING CAN
HELP
Helps diagnose performance issues
Allows viewing application
workloads in different ways: by
session, client, service, module,
action, and application.
APPLICATION TRACING IN THE WILD: TKPROF
Row Source
Plan
Rows Actual number of rows returned ateach step
Row so urce operation executed
Count Number of times procedure was executed
CPU CPU time in seconds
Elapsed All figures arecumulativeat each step
I/O Statistics
CR number of consistentreads
R physical reads (slow)
W number of writes
Parse, Execute
& Fetch
Statistics
Execute (query): Number of blocks visited to find the rows for the
operation
Execute (current): Number of buffers accessed to perform the update
Execute (rows): Number of rows actually accessed or processed.
Look for overparsing,readingtoo many blocks to return few blocks
(inefficientaccess path),inefficientlooping.
Recursive
Statements
AllocatingSpacedynamically
Suppressed in the example
Waits Events waited for by that statement
Can shownetwork issues
SQL ID: 0jyacmq304ryf Plan Hash: 0
BEGIN JSR.DBK_JSR_JC7001.BEFORE_QUERY( :1 , :2 , :3 , :4 , :5 ,
:6 , :7 , :8 , :9 ); END;
call count cpu elapsed disk query current rows
------- ------ -------- ---------- ---------- ---------- ---------- ----------
Parse 0 0.00 0.00 0 0 0 0
Execute 1 43.04 774.66 160060 1355279 17431 1
Fetch 0 0.00 0.00 0 0 0 0
------- ------ -------- ---------- ---------- ---------- ---------- ----------
total 1 43.04 774.66 160060 1355279 17431 1
Sort your TKPROF
Use sorting options to see the highest resource usage queries first
For example: Use option: EXECPU CPU time spent executing
APPLICATION TRACING BY SERVICE
Run the trace on the new service
Set the application or client to connect using the new service
Start the new Service
Create the new Service
Service A logical representation of a
database environment to the
outside world
Use a new service with each
new client application
OVERRIDING OPTIMIZER DECISIONS
Rewrite the
Query
Try query
transformations
Try SQL Macros
Change Your
Access Path
Add or Remove
Indexes
Gather Table
Statistics
Inaccurate statics
can cause the
optimizer to make
incorrect decisions
Change Your
Join (and Non-
Join) Predicates
Most restrictive
table first
Use the most
efficient join type
Use (or Don't
Use) Hints
Hints can limit the
optimizer's options,
so try to avoid hints
SQL Plan
Management
NEED TO REWRITE YOUR SQL LOOK AT THE OPTIMIZER QUERY TRANSFORMATIONS
Cost-based
OR expansion
Subquery
unnesting
(SU)
Complex view
merging
(CVM)
Join predicate
push down
(JPPD)
Cursor-
Duration
Temporary
Tables (CDT)
Transitive
closure
IN into EXISTS
(semijoins)
NOT IN into
NOT EXISTS
(anti-joins)
Filter push
down (FPD)
SQL
MACROS
(SQM)
What are SQL Macros?
A way to perform complex logic processinginside SQL statements
Functionsthat can factorout commonSQL expressionsand statements
into reusable,parameterizedconstructsusablein other SQL statements.
Benefits
FasterExecution
Reduces Context SwitchingBetween SQL engine and PL/SQL engine
Transparent tothe optimizer, and compatiblewith query/view merging
Single Pointof Definitionfor Logic
Types of SQM
Scalar (SELECT, WHERE, GROUP BY, HAVING,ORDER BY clauses)
Table expressions(FROM clause)
Availability
Oracle Database19.7and above
https://blogs.oracle.com/datawarehousing/post/sql-macros-have-arrived-in-autonomous-database
IF ATTENDING VIRTUALLY, PLEASE SUBMIT YOUR QUESTIONS INTO
THE Q&A FIELD IN THE VIRTUAL EVENT PLATFORM.
CONTINUE THE CONVERSATIONAT CONNECT CAMPGROUND
PLEASE VISIT THE CFMA BOOTH
OUTSIDE FOR MORE INFORMATION
Rachel Barker
Oltmans Construction
RachelB@Oltmans.com
Jamal Aburrub
CMiC
www.eclipse.org
Eclipse IDE,an Open Platform for Professional
Developers.
Eclipse allows you to independently developtoolsthat
seamlessly integratewithothertools.
Very flexibleand extensible platform.
Theseguidelines are intendedfor use by designersand
implementorsof an Eclipse userinterfaceextension.
ECLIPSE INTERFACE PLUG-INS FOR MORE CODING FUN
Jaspersoft Studio uses the Eclipse
environment to organize all the
resources. This means users create
projects that contain images, styles,
libraries, and other files needed for
report development. This is done in the
Project Explorer view .
END TO END APPLICATION TRACING PROCESS
Find Trace Location
SHOW PARAMETER
DIAGNOSTIC_DEST;
Enable End-to-
End Application
Tracing or SQL Tracing
Generate Workload
Disable Tracing
Trcsess Consolidate
trace files
TKPROF format
trace files
Review
APPLICATION TRACING TOOLS
End-to-End
Application
Tracing:
DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE
DBMS_MONITOR.SERV_MOD_ACT_TRACE_ENABLE
DBMS_MONITOR.SESSION_TRACE_ENABLE
DBMS_MONITOR.DATABASE_TRACE_ENABLE
SQLTrace:
DBMS_MONITOR.DATABASE_TRACE_ENABLE
DBMS_SESSION.SET_SQL_TRACE
ALTER SESSION SET SQL_TRACE
Sort your
TKPROF
EXECPU CPU time spentexecuting
Row Source
Plan
Rows Actual numberof rowsreturnedat eachstep
Rowsource operationexecuted
CPU
Elapsed All figuresare cumulativeateachstep
I/O Statistics CR numberof consistentreads
R physical reads(slow)
W numberof writes
Parse, Execute
& Fetch
Statistics
Execute (query):Numberof blocksvisitedtofindthe rowsfor
the operation
Execute (current):Numberof buffersaccessedto performthe
update
Execute (rows):Numberof rowsactuallyaccessedorprocessed.
Look foroverparsing, readingtoomanyblockstoreturnfew
blocks(inefficientaccesspath), inefficientlooping.
Recursive
Statements
AllocatingSpace dynamically

More Related Content

What's hot (20)

PDF
[非公開]Oracle Cloud Infrastructure Classic ネットワーク機能詳細
オラクルエンジニア通信
 
PDF
Oracle Databaseはクラウドに移行するべきか否か 全10ケースをご紹介 (Oracle Cloudウェビナーシリーズ: 2021年11月30日)
オラクルエンジニア通信
 
PPT
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
John Kanagaraj
 
PDF
Azure Backup と Azure Site Recovery
Junji Yamamoto
 
PPTX
What’s New in Oracle Database 19c - Part 1
Satishbabu Gunukula
 
PPTX
Oracle Database Performance Tuning Basics
nitin anjankar
 
PPTX
High Availability for Oracle SE2
Markus Flechtner
 
PDF
DB12c: All You Need to Know About the Resource Manager
Andrejs Vorobjovs
 
PDF
Migration to Oracle Multitenant
Jitendra Singh
 
PDF
MAA Best Practices for Oracle Database 19c
Markus Michalewicz
 
PDF
Apache Drill を利用した実データの分析
MapR Technologies Japan
 
PPTX
re:Invent 2022 DAT326 Deep dive into Amazon Aurora and its innovations
Grant McAlister
 
PDF
クラウドのコストを大幅削減!事例から見るクラウド間移行の効果(Oracle Cloudウェビナーシリーズ: 2020年7月8日)
オラクルエンジニア通信
 
PDF
Deep review of LMS process
Riyaj Shamsudeen
 
PDF
Oracle RAC Internals - The Cache Fusion Edition
Markus Michalewicz
 
PDF
Why Use an Oracle Database?
Markus Michalewicz
 
PDF
Oracle RAC 19c: Best Practices and Secret Internals
Anil Nair
 
PDF
Spark (Structured) Streaming vs. Kafka Streams
Guido Schmutz
 
PDF
Memoizeの仕組み(第41回PostgreSQLアンカンファレンス@オンライン 発表資料)
NTT DATA Technology & Innovation
 
PDF
Distributed computing with spark
Javier Santos Paniego
 
[非公開]Oracle Cloud Infrastructure Classic ネットワーク機能詳細
オラクルエンジニア通信
 
Oracle Databaseはクラウドに移行するべきか否か 全10ケースをご紹介 (Oracle Cloudウェビナーシリーズ: 2021年11月30日)
オラクルエンジニア通信
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
John Kanagaraj
 
Azure Backup と Azure Site Recovery
Junji Yamamoto
 
What’s New in Oracle Database 19c - Part 1
Satishbabu Gunukula
 
Oracle Database Performance Tuning Basics
nitin anjankar
 
High Availability for Oracle SE2
Markus Flechtner
 
DB12c: All You Need to Know About the Resource Manager
Andrejs Vorobjovs
 
Migration to Oracle Multitenant
Jitendra Singh
 
MAA Best Practices for Oracle Database 19c
Markus Michalewicz
 
Apache Drill を利用した実データの分析
MapR Technologies Japan
 
re:Invent 2022 DAT326 Deep dive into Amazon Aurora and its innovations
Grant McAlister
 
クラウドのコストを大幅削減!事例から見るクラウド間移行の効果(Oracle Cloudウェビナーシリーズ: 2020年7月8日)
オラクルエンジニア通信
 
Deep review of LMS process
Riyaj Shamsudeen
 
Oracle RAC Internals - The Cache Fusion Edition
Markus Michalewicz
 
Why Use an Oracle Database?
Markus Michalewicz
 
Oracle RAC 19c: Best Practices and Secret Internals
Anil Nair
 
Spark (Structured) Streaming vs. Kafka Streams
Guido Schmutz
 
Memoizeの仕組み(第41回PostgreSQLアンカンファレンス@オンライン 発表資料)
NTT DATA Technology & Innovation
 
Distributed computing with spark
Javier Santos Paniego
 

Similar to SQL Performance Tuning and New Features in Oracle 19c (20)

PDF
31063115_1679409488310Developer_Tuning_Tips_-_UTOUG_Mar_2023.pdf
TricantinoLopezPerez
 
PDF
Performance Stability, Tips and Tricks and Underscores
Jitendra Singh
 
PDF
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
cookie1969
 
PPTX
Beginners guide to_optimizer
Maria Colgan
 
PPT
Top 10 Oracle SQL tuning tips
Nirav Shah
 
PPTX
Understanding SQL Trace, TKPROF and Execution Plan for beginners
Carlos Sierra
 
PPTX
Sql and PL/SQL Best Practices I
Carlos Oliveira
 
PDF
Oracle SQL tuning with SQL Plan Management
Bjoern Rost
 
PDF
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
Cathrine Wilhelmsen
 
PPTX
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Guatemala User Group
 
PDF
Advanced tips for making Oracle databases faster
SolarWinds
 
PDF
SqlDay 2018 - Brief introduction into SQL Server Execution Plans
Marek Maśko
 
PPT
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
InSync Conference
 
PDF
Brad McGehee Intepreting Execution Plans Mar09
Mark Ginnebaugh
 
PDF
Brad McGehee Intepreting Execution Plans Mar09
guest9d79e073
 
PPT
SQL Optimization With Trace Data And Dbms Xplan V6
Mahesh Vallampati
 
PPTX
OpenWorld 2018 - 20 years of hints and tips
Connor McDonald
 
PDF
Managing Statistics for Optimal Query Performance
Karen Morton
 
PDF
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
cookie1969
 
PPTX
Oracle Query Optimizer - An Introduction
adryanbub
 
31063115_1679409488310Developer_Tuning_Tips_-_UTOUG_Mar_2023.pdf
TricantinoLopezPerez
 
Performance Stability, Tips and Tricks and Underscores
Jitendra Singh
 
Hailey_Database_Performance_Made_Easy_through_Graphics.pdf
cookie1969
 
Beginners guide to_optimizer
Maria Colgan
 
Top 10 Oracle SQL tuning tips
Nirav Shah
 
Understanding SQL Trace, TKPROF and Execution Plan for beginners
Carlos Sierra
 
Sql and PL/SQL Best Practices I
Carlos Oliveira
 
Oracle SQL tuning with SQL Plan Management
Bjoern Rost
 
Tools and Tips: From Accidental to Efficient Data Warehouse Developer (SQLSat...
Cathrine Wilhelmsen
 
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Guatemala User Group
 
Advanced tips for making Oracle databases faster
SolarWinds
 
SqlDay 2018 - Brief introduction into SQL Server Execution Plans
Marek Maśko
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
InSync Conference
 
Brad McGehee Intepreting Execution Plans Mar09
Mark Ginnebaugh
 
Brad McGehee Intepreting Execution Plans Mar09
guest9d79e073
 
SQL Optimization With Trace Data And Dbms Xplan V6
Mahesh Vallampati
 
OpenWorld 2018 - 20 years of hints and tips
Connor McDonald
 
Managing Statistics for Optimal Query Performance
Karen Morton
 
NOCOUG_201311_Fine_Tuning_Execution_Plans.pdf
cookie1969
 
Oracle Query Optimizer - An Introduction
adryanbub
 
Ad

Recently uploaded (20)

PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
July Patch Tuesday
Ivanti
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Python basic programing language for automation
DanialHabibi2
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Ad

SQL Performance Tuning and New Features in Oracle 19c

  • 1. Oltmans Construction Jamal Aburrub Projects Reports Team Lead CMiC Rachel Barker Business IntelligenceAnalyst
  • 4. AGENDA New Features in JasperStudio What's New in R12 The Dynamically Different 19c Optimizer Finding the Bottlenecks in Your Code Getting the Best From the Adaptive Optimizer Q & A
  • 5. WHAT IF I CAN DO A LOT FROM JasperStudio Create and Compile a Project Project Properties and Version Compatibilities Connect to JasperServer Direct Update on the Server
  • 6. NEW USER INTERFACE AND DESIGN VIEW (JasperStudio 7.5) Repository Explorer ProjectExplorer New Sourcelook and Feel New Preview Page Createyourown compositeelements PropertiesTabs ReportStats
  • 7. PROJECT EXPLORER Projectswith Independent Properties andContents Compatability Import Export ExportFiles To Build Project
  • 9. THE SOURCE TAB Color Coded Easy Search and Replace Outline for Easy Navigation
  • 10. THE PREVIEW TAB Parameters as a List More Output Formats All in One Area ReportOutput Stats FillingTime: CompilationTime:
  • 11. OBJECT PROPERTIES WINDOW IS NOW ORGANIZED BY TABS Object Properties Window Now Separated By Tab Appearance Borders Text Field Inheritance Hyperlink Advanced
  • 12. NO NEED FOR CONDITIONAL STYLES TRY THE NEW DYNAMIC PROPERTIES Show conditional amounts in different color (Negative Amounts, Cost Amount greater than the Budget Amount, etc.
  • 13. FONT SCALING IT IS A LIFE SAVER Employee Job Title Richard Baker Business Intelligence Analy Employee Job Title Richard Baker Business Intelligence Analyst
  • 14. EXCEL OUTPUT THE WAY I WANT IT! Spreadsheet Layout Makes Excel Output Easy XLS Advanced Properties More Control on XLS Output CSV Advanced Properties More Control on CSV Output
  • 15. WORKING WITH SPREADSHEETLAYOUT Columns must be of the same size Columns should be aligned at the same verticalposition Add one column per element Elementcan be a fieldor a framewith multipleobjects. Auto Resize Remove a field or a frame from the column
  • 16. ADVANCED XLS PROPERTIES Adds tags that define how data is exported to Microsoft format Yes/No (Hide or Show) Static Text Database Column Expression
  • 17. SAVE SPACE BY SHORTING THE FRAMES AROUND LARGER OBJECTS VS
  • 18. JASPERSOFT® USER GUIDES Help! Jaspersoft® Studio User Guide TIBCO JasperReports Server Ultimate Guide TIBCO JasperReports Server REST API Reference
  • 19. Implicitlyregisters start and end time of each report that runs from the UIConsole. Then it will register the report in da.SYS_PROGRAM_AUDITevery time the report query is run. Explicit registrationin SYS_DEBUG_LOG using Report packages use the following pl/sql Before_Report da.dbk_sys_audit.Jasper_Report_Begin_Query('APCVD'); T_Step := DBK_JSR_REPORTS.Set_Step_Debug(G_Package_Name, T_Procedure_Name, 'A: Context Variables'); Then it will register the debugmessages in da.Sys_Debug_Log CMiC developed it's own Auditutilities, two of which are used in Reports (Securityissues): FROM THE DESK OF JIM ORIOTIS
  • 20. SYS_PROGRAM_AUDIT TABLE select a.syspa_oraseq ,to_char(a.syspa_date,'DD-MON-YYYY HH24:MI:SS') syspa_date ,a.syspa_sessionid ,a.syspa_program_type ,a.syspa_program_name ,a.syspa_action ,a.syspa_user From da.SYS_PROGRAM_AUDIT a Where a.syspa_program_type = 'Report' And a.syspa_date > trunc(sysdate, 'MONTH') order by a.syspa_program_name,a.syspa_date ,a.syspa_oraseqdesc;
  • 21. What has changed in CMiC R12?
  • 22. WHAT HAS CHANGED IN R12 Client/Server Connection in Oracle FORMS & REPORTS V10 Stateless Sessions in ADF/JSP Conversion to Jasper Reports V10X Stateless Sessions in ADF/JSP Conversionto Jasper Server 6.3 R12 Upgrade to Jasper Server 7.5 R12Patch14-0
  • 24. PRAGMA SERIALLY REUSABLE REINITIATE YOUR PACKAGE EVERYRUN Initiating variables globally in packages is not advised with stateless connections
  • 25. PRAGMA SERIALLY REUSABLE REINITIATE YOUR PACKAGE EVERYRUN PACKAGE serial_package AS PRAGMA SERIALLY_REUSABLE; CURSOR equip_aco_curIS SELECT embch_bch_num , embch_name , embch_date , ... FROM da.emequipment e , da.emcomponent c , da.emtrancode t , da.wgtconv w , da.emctrl l , da.emtranpost p , da.embatch b ... TYPE equip_aco_aatIS TABLE OF equip_aco_join_cur%ROWTYPE INDEX BY PLS_INTEGER ; FUNCTION F_Get_Equip_ACO_Bch_Info( p_comp_code VARCHAR2 , p_bch_num NUMBER ) RETURN EQUIP_ACO_AAT ; END serial_package;
  • 26. THE DYNAMICALLY DIFFERENT ADAPTIVE OPTIMIZER & OTHER NEW FEATURES IN 19C Adaptive Query Optimization Adaptive Plans Join Methods Parallel Distribution Methods Bitmap Pruning Adaptive Statistics Dynamic Statistics Automatic Reoptimization SQL Plan Directives SQL Quarantine Optimizer Statistics Advisor Hint Reporting in DBMS_XPLAN New Initialization Parameters for Hints Oracle. (2019). The Optimizer in Oracle Database 19c [White Paper].
  • 27. HOW DO WE ADD VALUE TO OUR REPORTS? Consolidate Multiple Reports into One Report Add Other Datasources: External Databases, APIs, Files Include Related Documents All the InformationIn One Place Consolidate totalsby passing values from Subreports to the Main Reports Highlight critical data with conditional formatting Assist in Analyzing the Data Make it easy! EliminateUnnecessary Params & Fields Make it fast! Know your execution plan & SQL tune it Don't Waste Their Time
  • 28. FINDING THE BOTTLENECKS IN YOUR CODE Performance problems can occur when consolidating reports and adding data from more places. Resolving the problem starts with understanding the execution plan.
  • 29. READING EXECUTION PLANS IT'S NOT ROCKET SCIENCE IF YOU BREAK IT DOWN Go to theFirst Unvisited Leaf Start at the Depth Go to the Parent of the First Leaf Followthe IndentationsOutward Go to theNext Unvisited Leaf
  • 30. WHAT DO WE WANT FROM OUR EXECUTION PLAN? Accurate Row Estimates Efficient Access Paths Minimal I/O Quick Operation Steps Better Performance Execution Plan Shows optimizer decisions Shows Key Performance Indicators for the SQL Has a hierarchal tree format Parent-child relationships are determined by the indentations
  • 31. PERFORMANCE TUNING DEMO CLIENTS TABLE COMPANY_CODE VARCHAR2(10) CLIENT_CODE VARCHAR2(30) CITY VARCHAR2(100) REGION_CODE VARCHAR2(100) COUNTRY_CODE VARCHAR2(100) CLIENT_ID (NUMBER) ABC CITY OF LOS ANGELES LOS ANGELES CA U.S.A. 1 XYZ CITY OF NEW YORK NEW YORK NY U.S.A. 2 ... TABLE: CLIENTS_TN
  • 32. PERFORMANCE TUNING DEMO EXECUTION PLAN 1
  • 33. PERFORMANCE TUNING DEMO EXECUTION PLAN 2
  • 34. END-TO-END APPLICATION TRACING CAN GIVE YOU DIRECTION How Do I Know If It's My SQL???
  • 35. END-TO-END APPLICATION TRACING CAN HELP Helps diagnose performance issues Allows viewing application workloads in different ways: by session, client, service, module, action, and application.
  • 36. APPLICATION TRACING IN THE WILD: TKPROF Row Source Plan Rows Actual number of rows returned ateach step Row so urce operation executed Count Number of times procedure was executed CPU CPU time in seconds Elapsed All figures arecumulativeat each step I/O Statistics CR number of consistentreads R physical reads (slow) W number of writes Parse, Execute & Fetch Statistics Execute (query): Number of blocks visited to find the rows for the operation Execute (current): Number of buffers accessed to perform the update Execute (rows): Number of rows actually accessed or processed. Look for overparsing,readingtoo many blocks to return few blocks (inefficientaccess path),inefficientlooping. Recursive Statements AllocatingSpacedynamically Suppressed in the example Waits Events waited for by that statement Can shownetwork issues SQL ID: 0jyacmq304ryf Plan Hash: 0 BEGIN JSR.DBK_JSR_JC7001.BEFORE_QUERY( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 ); END; call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 0 0.00 0.00 0 0 0 0 Execute 1 43.04 774.66 160060 1355279 17431 1 Fetch 0 0.00 0.00 0 0 0 0 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 1 43.04 774.66 160060 1355279 17431 1 Sort your TKPROF Use sorting options to see the highest resource usage queries first For example: Use option: EXECPU CPU time spent executing
  • 37. APPLICATION TRACING BY SERVICE Run the trace on the new service Set the application or client to connect using the new service Start the new Service Create the new Service Service A logical representation of a database environment to the outside world Use a new service with each new client application
  • 38. OVERRIDING OPTIMIZER DECISIONS Rewrite the Query Try query transformations Try SQL Macros Change Your Access Path Add or Remove Indexes Gather Table Statistics Inaccurate statics can cause the optimizer to make incorrect decisions Change Your Join (and Non- Join) Predicates Most restrictive table first Use the most efficient join type Use (or Don't Use) Hints Hints can limit the optimizer's options, so try to avoid hints SQL Plan Management
  • 39. NEED TO REWRITE YOUR SQL LOOK AT THE OPTIMIZER QUERY TRANSFORMATIONS Cost-based OR expansion Subquery unnesting (SU) Complex view merging (CVM) Join predicate push down (JPPD) Cursor- Duration Temporary Tables (CDT) Transitive closure IN into EXISTS (semijoins) NOT IN into NOT EXISTS (anti-joins) Filter push down (FPD)
  • 40. SQL MACROS (SQM) What are SQL Macros? A way to perform complex logic processinginside SQL statements Functionsthat can factorout commonSQL expressionsand statements into reusable,parameterizedconstructsusablein other SQL statements. Benefits FasterExecution Reduces Context SwitchingBetween SQL engine and PL/SQL engine Transparent tothe optimizer, and compatiblewith query/view merging Single Pointof Definitionfor Logic Types of SQM Scalar (SELECT, WHERE, GROUP BY, HAVING,ORDER BY clauses) Table expressions(FROM clause) Availability Oracle Database19.7and above https://blogs.oracle.com/datawarehousing/post/sql-macros-have-arrived-in-autonomous-database
  • 41. IF ATTENDING VIRTUALLY, PLEASE SUBMIT YOUR QUESTIONS INTO THE Q&A FIELD IN THE VIRTUAL EVENT PLATFORM.
  • 42. CONTINUE THE CONVERSATIONAT CONNECT CAMPGROUND PLEASE VISIT THE CFMA BOOTH OUTSIDE FOR MORE INFORMATION Rachel Barker Oltmans Construction [email protected] Jamal Aburrub CMiC
  • 43. www.eclipse.org Eclipse IDE,an Open Platform for Professional Developers. Eclipse allows you to independently developtoolsthat seamlessly integratewithothertools. Very flexibleand extensible platform. Theseguidelines are intendedfor use by designersand implementorsof an Eclipse userinterfaceextension.
  • 44. ECLIPSE INTERFACE PLUG-INS FOR MORE CODING FUN Jaspersoft Studio uses the Eclipse environment to organize all the resources. This means users create projects that contain images, styles, libraries, and other files needed for report development. This is done in the Project Explorer view .
  • 45. END TO END APPLICATION TRACING PROCESS Find Trace Location SHOW PARAMETER DIAGNOSTIC_DEST; Enable End-to- End Application Tracing or SQL Tracing Generate Workload Disable Tracing Trcsess Consolidate trace files TKPROF format trace files Review
  • 46. APPLICATION TRACING TOOLS End-to-End Application Tracing: DBMS_MONITOR.CLIENT_ID_TRACE_ENABLE DBMS_MONITOR.SERV_MOD_ACT_TRACE_ENABLE DBMS_MONITOR.SESSION_TRACE_ENABLE DBMS_MONITOR.DATABASE_TRACE_ENABLE SQLTrace: DBMS_MONITOR.DATABASE_TRACE_ENABLE DBMS_SESSION.SET_SQL_TRACE ALTER SESSION SET SQL_TRACE Sort your TKPROF EXECPU CPU time spentexecuting Row Source Plan Rows Actual numberof rowsreturnedat eachstep Rowsource operationexecuted CPU Elapsed All figuresare cumulativeateachstep I/O Statistics CR numberof consistentreads R physical reads(slow) W numberof writes Parse, Execute & Fetch Statistics Execute (query):Numberof blocksvisitedtofindthe rowsfor the operation Execute (current):Numberof buffersaccessedto performthe update Execute (rows):Numberof rowsactuallyaccessedorprocessed. Look foroverparsing, readingtoomanyblockstoreturnfew blocks(inefficientaccesspath), inefficientlooping. Recursive Statements AllocatingSpace dynamically