Using package cache information and db2advis to look for performance improvement opportunities
The Design
Advisor can analyze SQL statements to make recommendations for how
to improve database performance.
You can use statements
from the package cache (including statements captured by the package
cache event monitor) as input to the Design Advisor to identify changes
you can make to improve the performance for a given workload, or even
for all statements run between two points in time.
Before you begin
- The CREATE EVENT MONITOR statement requires a table space with a page size of at least 8 K to store the unformatted event (UE) table produced by the event monitor. Unless a table space is explicitly named in the CREATE EVENT MONITOR statement, the default table space for the database is used.
- You must have created the explain tables required by the Design Advisor.
About this task
Restrictions
Procedure
Results
execution started at timestamp 2010-03-16-14.25.57.562000
Using the default table space name USERSPACE1
found [47] SQL statements from the input file
excluding statement [0] from the workload.
excluding statement [1] from the workload.
excluding statement [19] from the workload.
excluding statement [39] from the workload.
Recommending indexes...
Recommending MQTs...
Recommending Multi-Dimensional Clusterings...
Found 19 user defined views in the catalog table
Found [17] candidate MQTs
Getting cost of workload with MQTs
total disk space needed for initial set [ 0.159] MB
total disk space constrained to [ 69.215] MB
2 indexes in current solution
0 MQTs in current solution
total disk space needed for initial set [ 0.024] MB
total disk space constrained to [ 103.822] MB
No useful Multi-dimensional Clustering dimensions for this workload
[5651.8281] timerons (without recommendations)
[5519.8281] timerons (with current solution)
[2.34%] improvement
--
--
-- LIST OF MODIFIED CREATE-TABLE STATEMENTS WITH RECOMMENDED PARTITIONING KEYS AND TABLESPACES AND/OR RECOMMENDED MULTI-DIMENSIONAL CLUSTERINGS
-- ===========================
-- No new partitioning keys or tablespaces are recommended for this workload.
--
--
-- LIST OF RECOMMENDED MQTs
-- ===========================
--
--
-- RECOMMENDED EXISTING MQTs
-- ===========================
--
--
-- UNUSED EXISTING MQTs
-- ============================
-- DROP TABLE "ASRISK "."ADEFUSR";
--
--
-- RECOMMENDED CLUSTERING INDEXES
-- ============================
--
--
-- LIST OF RECOMMENDED INDEXES
-- ===========================
-- index[1], 0.024MB
CREATE INDEX "ASRISK "."IDX003161830530000" ON "ASRISK "."SYSINDEXES"
("CREATOR" ASC, "NAME" ASC, "TBCREATOR" ASC, "TBNAME"
ASC) ALLOW REVERSE SCANS COLLECT SAMPLED DETAILED STATISTICS;
COMMIT WORK ;
--
--
-- RECOMMENDED EXISTING INDEXES
-- ============================
-- RUNSTATS ON TABLE "SYSTOOLS"."POLICY" FOR SAMPLED DETAILED INDEX "SYSTOOLS"."POLICY_UNQ" ;
-- COMMIT WORK ;
-- RUNSTATS ON TABLE "SYSTOOLS"."HMON_ATM_INFO" FOR SAMPLED DETAILED INDEX "SYSTOOLS"."ATM_UNIQ" ;
-- COMMIT WORK ;
-- RUNSTATS ON TABLE "SYSIBM "."SYSDATAPARTITIONS" FOR SAMPLED DETAILED INDEX "SYSIBM "."INDDATAPARTITIONS03" ;
-- COMMIT WORK ;
-- RUNSTATS ON TABLE "SYSIBM "."SYSTABLES" FOR SAMPLED DETAILED INDEX "SYSIBM "."INDTABLES01" ;
-- COMMIT WORK ;
-- RUNSTATS ON TABLE "SYSIBM "."SYSTABLESPACES" FOR SAMPLED DETAILED INDEX "SYSIBM "."INDTABLESPACES04" ;
-- COMMIT WORK ;
-- RUNSTATS ON TABLE "SYSIBM "."SYSCOLUMNS" FOR SAMPLED DETAILED INDEX "SYSIBM "."INDCOLUMNS01" ;
-- COMMIT WORK ;
-- RUNSTATS ON TABLE "SYSIBM "."SYSINDEXES" FOR SAMPLED DETAILED INDEX "SYSIBM "."INDINDEXES02" ;
-- COMMIT WORK ;
-- RUNSTATS ON TABLE "SYSIBM "."SYSTRIGGERS" FOR SAMPLED DETAILED INDEX "SYSIBM "."INDTRIGGERS02" ;
-- COMMIT WORK ;
--
--
-- UNUSED EXISTING INDEXES
-- ============================
-- DROP INDEX "ASRISK "."PKGCACHE_EVENT_IND1";
-- ===========================
--
-- ====ADVISOR DETAILED XML OUTPUT=============
-- ==(Benefits do not include clustering recommendations)==
⋮
Note: The output from the Design Advisor has been
truncated for presentation purposes.