What's new in Oracle 19c (and CMiC R12) and the reporting software Jaspersoft Studios. If you are not interested in Jasper go ahead and skip to page 26. Explains how to read an execution plan and what to look for in an optimized execution plan.
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
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
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;
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
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