BMC SQL Performance for DB2

Transcription

BMC SQL Performance for DB2
Change Management:
Il ciclo di vita di un pacchetto applicativo DB2
Matteo Ferrari
Gianluca Alessi
BMC Software
© Copyright 4/11/2013 BMC Software, Inc
2
Prologue
We want to follow the life of a release of an application or a single
change from the beginning to the end
It is made of:
-
DB2 Packages (SQL Statement) changes
Schema Changes
It involves different areas:
-
-
DBA
Change Process owners
Application owners
Quality Control
Scheduling
IT Operations
Support
© Copyright 4/11/2013 BMC Software, Inc
Adult
Adolescence
Childhood
Birth
3
What is the business need?
A new application package in the Production environment
- Controlled
- Optimized for Performance
- Avoid any bad surprise
Before Production rollout
- Lack of time/skills to analyze complex SQL
- Lack of time/skills to analyze huge number of SQL
- Lack of skill to implement a schema change in the most efficient way
- Possibility to fall back to a previous version
After Production rollout
- Schema Alignment/Sync of different systems (if CLONE-based architecture)
- Risk of poor performance
- Firefighting
- Even good performing SQL can go bad over time
Typically the approach is reactive
Solution is Application Lifecycle Management
It is not a trivial task - Tools, Processes and Organization
© Copyright 4/11/2013 BMC Software, Inc
4
Application Lifecycle
Time and resource to maintain multiple environments
Programs and schema follow a Change Management Process during
their Lifecycle
Many customers do not plan a Lifecycle Process
© Copyright 4/11/2013 BMC Software, Inc
5
The importance of a SQL Lifecycle Process
THE WINNING RECIPE
One set of simple products
Measure
Sophisticated analisys tools
Integration to existing processes
Collaboration between Areas
Stabilize
Tune
Standardize
© Copyright 4/11/2013 BMC Software, Inc
6
The importance of a Change Management Process
THE WINNING RECIPE
One sophisticated change tool
Delivery
Integration to existing processes
Bi-directional change management
Reconciliation
Rollback
Versioning
© Copyright 4/11/2013 BMC Software, Inc
7
Application Lifecycle Management environments
DEVELOPMENT
-
Used for Functional test of the single program
Schema changes are made during the development at different times
Normally contains a specific subset of data
Used to test program logic
TEST
-
Used for Functional test of the whole application
Normally contains a subset of Production data
Used to have a complete picture of the application
PrePROD
-
Used for Stress and Functional test of the whole application
Normally can contain complete Production data copy or a subset
Used to measure the application performance
PROD
-
Real Production environment
Here applications run together with a mixed workload
© Copyright 4/11/2013 BMC Software, Inc
8
© Copyright 4/11/2013 BMC Software, Inc
9
Development enviroment
Alter, Baseline
DEVEL
TEST
PrePROD
PROD
Alter current Schema
• Alter the definition of the DB2 objects
Create new
• Create new object in a controlled way
Baseline
• Schema snapshot for each potential point of delivery
(release)
Output
• DDL, Baseline
© Copyright 4/11/2013 BMC Software, Inc
10
Standardize SQL
Precompile + Explain
Mismatch analysis
DEVEL
TEST
PrePROD
PROD
Eliminate ‘bad’ SQL
• Reduce potential problems
• Avoid mismatch b/w pgm and SQL
Adhere to standards
• Correct qualifiers, objects, SQL techniques can be suggested or
forced
Test SQL before program
• Execute before compiling
Evaluate impact
• Check for impact on changes to structures
© Copyright 4/11/2013 BMC Software, Inc
11
Test Environment
Import
DEVEL
TEST
PrePROD
PROD
Migration Profiles
Import
• Receive the definition from the development
• Compare between DDL or Baseline and DB2 Catalog
• Apply DDL or Baseline
Standardize
• Enforce Rules of the test environment
Baseline
• Schema snapshot before and after Apply
Rollback
• Backout to a previous version of the schema
© Copyright 4/11/2013 BMC Software, Inc
12
Tune SQL
Collect Perf data
Precompile + Explain
DEVEL
TEST
PrePROD
PROD
Migrate Statistics
Pinpoint inefficiencies
• Preview performance problems
• Avoid mismatch b/w pgm and SQL
What-if analisys
• Correct SQL, finding the best performing way
• Suggest changes to physical structures
Forecast PROD execution
• Use DB2 Prod statistics
• Analisys could simulate Production environment
© Copyright 4/11/2013 BMC Software, Inc
13
Pre Prod Environment
Compare b/w Catalog,
DDL, Baseline
DEVEL
TEST
PrePROD
PROD
Compare
• Compare between the DDL or Baseline or source DB2 Catalog
and the target DB2 catalog
Standardize
• Enforce Rules of the pre-prod environment
Baseline
• Schema snapshot before and after the apply
Reconciliation
© Copyright 4/11/2013 BMC Software, Inc
•Make changes and reconciliation with the Development
Environment
14
Stabilize SQL
Collect Perf data
DEVEL
TEST
Precompile + Explain
+ Compare
PrePROD
PROD
Migrate Statistics
Historical Compare
• Verify what changed since last precompile. Possible warning
Deep Perf Analisys
• Online analysis of the application workload
• Understand the possible optimizations
Performance tests
• Run on a real Production-like environment
© Copyright 4/11/2013 BMC Software, Inc
15
Production Environment
Alter different
locations
DEVEL
TEST
PrePROD
PROD
Compare
• Compare between DDL or Baseline or source DB2 Catalog and
target DB2 catalog
Standardize
• Enforce Rules of the pre-prod environments
Apply
• Apply the changes to the different DB2 subsystems
• one shot
• at different time
Reconciliation
© Copyright 4/11/2013 BMC Software, Inc
• Make changes and reconciliation with the Development
Environment
16
Data Changes in a glance
CD Tables
Import
DB2 Catalog
Migrate
Profile PP
Baselines
Analysis
Execute
ALTER Worklist
CDL
Migrate
Profile A
DDL
Compare
Migrate
Profile B
Migrate
Profile C
DB2 Catalog
Migrate
Profile T
© Copyright 4/11/2013 BMC Software, Inc
Mask, Change & Suppress
Rules
DB2 Catalog
Prod A
DB2 Catalog
Prod B
DB2 Catalog
Prod C
17
Measure SQL
Collect short to long
period SQL Perf Data
DEVEL
TEST
PrePROD
PROD
Precompile + Explain
+ Compare
Historical Compare
• Verify what changed since last precompile. Possible stop
Deep Perf Analisys
• Online analysis of the whole workload
• Dynamic SQL analysis
• Understand the possible optimizations
Trend analisys
• Batch Analysis of medium to long period performance trends
© Copyright 4/11/2013 BMC Software, Inc
18
BMC comprehensive set of products
Workload
Compare
Advisor
Workload Index
Advisor
Exception
Advisor
Reorg Advisor
Apptune for DB2
SQL Explorer for DB2
BMC SQL Performance for DB2 Solution
BMC Change Manager for DB2
© Copyright 4/11/2013 BMC Software, Inc
19
BMC SQL Performance unique functionalities
Efficiency filtering
-
Monitor as needed based on
recent performance history

Prize for ‘good’ statements
Resource Saving Options
-
Bypass FETCH timings

-
Ignore dynamic SQL text literals

-
Exceptions triggered only on first fetch
All dynamic SQL statements that are
otherwise the same are considered as
one SQL statement
Sample data with extrapolation

Monitor a constant proportion of
everything
zIIP offload
-
All the I/O to read/write
performance data is offloaded
© Copyright 4/11/2013 BMC Software, Inc
20
BMC Change Manager unique functionalities
Baseline/Versioning Management
-
Catalog or DDL as input
Management of different environment standards
-
Migrate Profiles
DML for massive changes
Structured and controlled process to manage changes
-
SCOPE -> ANALYZE -> EXECUTE
Import / Export functionalities (Baseline <-> DDL, CDL <-> Workid)
Robust compare engine with multiple sources
-
CDL, DDL, Catalog, Baseline
Batch Automation
-
CM/Pilot for the full execution in batch (Compare – Import – Analyze – Execution)
© Copyright 4/11/2013 BMC Software, Inc
21
What’s next ?
GUI Interface will complement standard 3270 mode
Task based approach initially to:
-
Catalog Management
SQL Performance
Open to integration with external products
Functionality included in the base component:
-Catalog Navigation
-Explain Compare
-What-If Statement
-Mini Executor
-File Manager
© Copyright 4/11/2013 BMC Software, Inc
-Workspace Manager
-Visual Explain
-Bind/Rebind/Free
-JES Spool Browser
-DB2 Commands
-DDL
-DCL
-Drop
22
Benefits of an integrated Change Management Process
Mitigate risk
-
-
Proactive control of Application Packages before production
Enforce standards
Meet issues/inconsistencies in the early stages
Performance
-
Optimize SQL statements in the early stages
Productivity
-
Reduce or eliminate manual errors, especially for the schema changes
Learn from the tools
Less time spent for troubleshooting
© Copyright 4/11/2013 BMC Software, Inc
23
Learn more at www.bmc.com
© Copyright 4/11/2013 BMC Software, Inc
24