SlideShare a Scribd company logo
1 of 46
Download to read offline
Oltmans Construction
Jamal Aburrub
Projects Reports Team Lead
CMiC
Rachel Barker
Business IntelligenceAnalyst
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

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

Mainframe Technology Overview
Mainframe Technology OverviewMainframe Technology Overview
Mainframe Technology OverviewHaim Ben Zagmi
 
Autosys Trainer CV
Autosys Trainer CVAutosys Trainer CV
Autosys Trainer CVDS gupta
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basicsnitin anjankar
 
Oracle Query Optimizer - An Introduction
Oracle Query Optimizer - An IntroductionOracle Query Optimizer - An Introduction
Oracle Query Optimizer - An Introductionadryanbub
 
Spring batch for large enterprises operations
Spring batch for large enterprises operations Spring batch for large enterprises operations
Spring batch for large enterprises operations Ignasi González
 
SamzaSQL QCon'16 presentation
SamzaSQL QCon'16 presentationSamzaSQL QCon'16 presentation
SamzaSQL QCon'16 presentationYi Pan
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuningYogiji Creations
 
SQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query PerformanceSQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query PerformanceVinod Kumar
 
Performance eng prakash.sahu
Performance eng prakash.sahuPerformance eng prakash.sahu
Performance eng prakash.sahuDr. Prakash Sahu
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq lsInSync Conference
 
Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...
Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...
Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...Chester Chen
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cRonald Francisco Vargas Quesada
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1MariaDB plc
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1MariaDB plc
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1MariaDB plc
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsJohn Kanagaraj
 
NEW TOP FEATURES COMING TO SALESFORCE RELEASE WINTER 23 RELEASE BY NBSCONSULTING
NEW TOP FEATURES COMING TO SALESFORCE RELEASE WINTER 23 RELEASE BY NBSCONSULTINGNEW TOP FEATURES COMING TO SALESFORCE RELEASE WINTER 23 RELEASE BY NBSCONSULTING
NEW TOP FEATURES COMING TO SALESFORCE RELEASE WINTER 23 RELEASE BY NBSCONSULTINGNBSConsulting
 
Big Data: Getting off to a fast start with Big SQL (World of Watson 2016 sess...
Big Data: Getting off to a fast start with Big SQL (World of Watson 2016 sess...Big Data: Getting off to a fast start with Big SQL (World of Watson 2016 sess...
Big Data: Getting off to a fast start with Big SQL (World of Watson 2016 sess...Cynthia Saracco
 
Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.Keshav Murthy
 

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

Mainframe Technology Overview
Mainframe Technology OverviewMainframe Technology Overview
Mainframe Technology Overview
 
Autosys Trainer CV
Autosys Trainer CVAutosys Trainer CV
Autosys Trainer CV
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
Oracle Query Optimizer - An Introduction
Oracle Query Optimizer - An IntroductionOracle Query Optimizer - An Introduction
Oracle Query Optimizer - An Introduction
 
Spring batch for large enterprises operations
Spring batch for large enterprises operations Spring batch for large enterprises operations
Spring batch for large enterprises operations
 
SamzaSQL QCon'16 presentation
SamzaSQL QCon'16 presentationSamzaSQL QCon'16 presentation
SamzaSQL QCon'16 presentation
 
Oracle database performance tuning
Oracle database performance tuningOracle database performance tuning
Oracle database performance tuning
 
SQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query PerformanceSQL Server Query Optimization, Execution and Debugging Query Performance
SQL Server Query Optimization, Execution and Debugging Query Performance
 
Performance eng prakash.sahu
Performance eng prakash.sahuPerformance eng prakash.sahu
Performance eng prakash.sahu
 
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu   (obscure) tools of the trade for tuning oracle sq lsTony Jambu   (obscure) tools of the trade for tuning oracle sq ls
Tony Jambu (obscure) tools of the trade for tuning oracle sq ls
 
Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...
Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...
Analytics Metrics delivery and ML Feature visualization: Evolution of Data Pl...
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12c
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
 
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
What's New in MariaDB Server 10.2 and MariaDB MaxScale 2.1
 
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
Die Neuheiten in MariaDB 10.2 und MaxScale 2.1
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
 
NEW TOP FEATURES COMING TO SALESFORCE RELEASE WINTER 23 RELEASE BY NBSCONSULTING
NEW TOP FEATURES COMING TO SALESFORCE RELEASE WINTER 23 RELEASE BY NBSCONSULTINGNEW TOP FEATURES COMING TO SALESFORCE RELEASE WINTER 23 RELEASE BY NBSCONSULTING
NEW TOP FEATURES COMING TO SALESFORCE RELEASE WINTER 23 RELEASE BY NBSCONSULTING
 
Big Data: Getting off to a fast start with Big SQL (World of Watson 2016 sess...
Big Data: Getting off to a fast start with Big SQL (World of Watson 2016 sess...Big Data: Getting off to a fast start with Big SQL (World of Watson 2016 sess...
Big Data: Getting off to a fast start with Big SQL (World of Watson 2016 sess...
 
Sherlock holmes for dba’s
Sherlock holmes for dba’sSherlock holmes for dba’s
Sherlock holmes for dba’s
 
Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.Distributed Queries in IDS: New features.
Distributed Queries in IDS: New features.
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

SQL Performance Tuning and New Features in Oracle 19c

  • 1. Oltmans Construction Jamal Aburrub Projects Reports Team Lead CMiC Rachel Barker Business IntelligenceAnalyst
  • 2.
  • 3.
  • 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 RachelB@Oltmans.com 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