DB2 Index Monitoring - taming the tiger

DB2 Index Monitoring

Most DBAs would agree with the point that in most DBMS perform very well initially when a new database is created, or when a new schema is created. That happens because when and RDBMS create a schema objects, initially there are not many deletes/updates that will make storage perforated.

Performance degrades after few months. On the average first time about 6 months and later maybe between 3 months and 6 months. All this slowness depends upon the count of deletes/updates. Many databases (DBMS’s) have provisioned auto tunning type of facilities, still, DBAs usually struggle all the times. Few things that help it are UPDATE Statistics and REORG indexes.

?DB2, like others, is no exception. Bigger the volume of transactions, shorter is performance degradation period. As the saying goes “where there is a will, there is a way”, DBAs tend to find ways around it, or even sometimes shortcuts around it.

For such situation in one big data warehouse (62TB -> 92TB size, InfoSphere V10.5, AIX 6.1) following technique had been very successful. Not an attention to derail the DBAs from official way to analyze the performance with help of explain tables (db2expln), this course of action will definitely rule-out the possibility of subtle degradation of the query performance.

Steps:

1.??????Get list of top sql cost queries:

  • a.??????Get SYSIBMADM.LONG_RUNNING_SQL list sorted desc on ELAPSED_TIME_MIN.
  • b.??????Evaluate top 5 with index advisor tool (db2avis)
  • c.??????Index advisor would suggest new index with projected improvement
  • d.??????Filter the list with all index definitions that would reflect more than 35% improvement.

2.??????Hand over to App-DBA for creation of indexes:

  • a.??????App-DBA should create one index at a time
  • b.??????App-DBA should consult with DBA for results, DBA would repeat evaluations on this query again
  • c.??????Repeat till the projected improvement falls below 35%.

3.??????Flush package cache at appropriate time:

  • a.??????Flush package as the current session completes.

Schedule:

Make a cron-job that checks for slow running queries every hour. ?Select the time among appropriate periods where it can cover all queries that run in the database. You may schedule this distributed by odd-even dates.

要查看或添加评论,请登录

SARBJIT GILL的更多文章

  • Can Pakistan still survive? The answer is YES

    Can Pakistan still survive? The answer is YES

    Rather any failed state can still survive. We will have a specific look at a failed state ‘Pakistan’.

  • Are you a hard worker? Good to know!!

    Are you a hard worker? Good to know!!

    A common thought across the horizon, hard worker are the winners. Since my childhood (rather the babyhood) I have been…

    1 条评论
  • DB2 LUW Field story - shell scripting - I

    DB2 LUW Field story - shell scripting - I

    When we talk about shell scripting, a broader scene pops up in my mind. There are may shells, there are many platforms,…

  • Yo DBAs, I am write a script – III

    Yo DBAs, I am write a script – III

    Scripting: Which language which OS which interpreter ? When it comes to the playground, there are many languages, many…

  • Yo DBAs, I am write a script – II

    Yo DBAs, I am write a script – II

    Scripting: how is it different than programming? Basically, all scripting languages are programming languages. The…

  • Yo DBAs, I am write a script

    Yo DBAs, I am write a script

    Scripting: What is it, by the way! Basically, let me start writing. What if I say “let me start scripting”.

  • Hadoop - is it OLAP or OLTP

    Hadoop - is it OLAP or OLTP

    OLAP & OLTP are the techniques used in digital information retrieval and processing. OLTP which is Online Transaction…

    1 条评论
  • DBA – Transactional Replication - How it works

    DBA – Transactional Replication - How it works

    In relational database model, replication refers to a process that stores local database changes and sends these…

  • DBA Career – Canada and Overseas - hurdles and remedies -2

    DBA Career – Canada and Overseas - hurdles and remedies -2

    All career tracks have hardships, especially when you put yourself in global community. In previous article we had…

  • DBA Career – Canada and Overseas - hurdles and remedies

    DBA Career – Canada and Overseas - hurdles and remedies

    All career tracks have hardships, especially when you put yourself in global community. To understand it easily, let us…

社区洞察

其他会员也浏览了