DB2 Tuning Toolkit – DB2 Design advisor - Ddb2advis

 One of the DBA objectives is to decrease the query cost. Decreasing the query cost – improves overall performance. The db2advis recommends  indexes for a query.

A syntax  and process example:

 Step 1 – Create the source file

  Put a  query in a input file called index.sql. This is just a sample query

select SUBSTR(TBNAME,1,40), SUBSTR(TBCREATOR,1,10),substr(name,1,30), SUBSTR(CREATOR,1,8),substr(colnames,1,60), firstkeycard, fullkeycard, sequential_pages, density, iid, uniquerule, stats_time, colnames from sysibm.sysindexes a order by tbcreator, TBNAME, NAME;

 Step 2  Execute the db2advis command

 db2advis -d myDB -i index.sql

 If you see the error message:

 Explain tables not set up properly for schema MYINST

 The insert into the ADVISE_INSTANCE table has failed.

 0 solutions were evaluated by the advisor

 exiting with error code [-219]

  To fix that problem, I execute db2 -tvf <instance_home>\sqllib\misc\EXPLAIN.DDL

Comments

Popular posts from this blog

Db2 export command example using file format (del , ixf)

How to fix DB2 Tablespace OFFLINE state issue?

Phases of a load operation