| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |

06-08-10, 14:06
|
|
Registered User
|
|
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
|
|
|
Where are IDX scan couters in DB2 ??
|
|
Hello Friends,
To analyze which indexes are being used, I need to check how many index scans were run on a given index. That means how many times an index had been used in past 24 hours.
Can someone help me find data for an index and maybe if possible about a table too.
Regards
|
|

06-08-10, 14:27
|
|
Registered User
|
|
Join Date: Jan 2003
Posts: 3,575
|
|
Which DB2 version and OS?
Andy
|
|

06-08-10, 14:37
|
|
Registered User
|
|
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
|
|
|
|

06-08-10, 14:45
|
|
Registered User
|
|
Join Date: Jan 2003
Posts: 3,575
|
|
|
|

06-08-10, 14:52
|
|
Registered User
|
|
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
|
|
Alright,
So db2pd can be run periodically.
Thanks for help
|
|

06-09-10, 09:34
|
|
Registered User
|
|
Join Date: Nov 2005
Location: IL
Posts: 554
|
|
As much as your heart desires  but I would only run it before deactivating db/cycling the instance. which ever comes first. That is assuming you do it on a regular intervals for house cleaning. If not, you are going to see data there from the last time one of those events took place.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
DB2 v9.1.0.2 os 5.3.0.0
|
|

06-09-10, 09:39
|
|
Registered User
|
|
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
|
|
Well,
I am writing a script for daily checks. At the begining of each day. I guess I should keep a record for about 7 days or so; to review daily ; for a look on the trend.
Regards
|
|

06-09-10, 10:07
|
|
Registered User
|
|
Join Date: Nov 2005
Location: IL
Posts: 554
|
|
You are going to be wasting your and others time. This is not something you check on a daily or even weekly basis. I would venture to say that this is something that you want to check on a quarterly basis unless you are creating new indexes and implementing new projects on a daily basis.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
DB2 v9.1.0.2 os 5.3.0.0
|
|

06-09-10, 10:37
|
|
Registered User
|
|
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
|
|
Agree,
I just had a discussion; we are not going to set up a daily job for this. May be once a while , or when my manager wants to have a look on details.
Regards for good suggestion
|
|

06-09-10, 11:01
|
|
Registered User
|
|
Join Date: Nov 2005
Location: IL
Posts: 554
|
|
I have decided to take another look at it and possibly finally write something up that will take a manual work out of the picture, if it all possible.
I would be curious to compare the notes and see how you are going about it and maybe put a collective together to get this done.
What I have found out thus far is for some unknown reason IBM did not extended fields for tbname, schema on the output and if you are on a 9 what ever your tables most likely been extended past 18 char point.
This makes it a bit tricky to get a correct info out. In the index section it only gives you a chopped tbname and an IID of the index. So, to identify the correct index you have to cross match hex value from an index section to a hex value on the table section to get a correct tableID. After that match it with a correct tbname and only then go get a correct indname. They sure do not make it easy on you.
I think I will pipe the output to a file. From there I would slice and dice that file into a two sections: table and index files. From there load that data into tables and then write SQL to get what I really need.
What do you think?
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
DB2 v9.1.0.2 os 5.3.0.0
|
|

06-09-10, 11:14
|
|
Registered User
|
|
Join Date: Sep 2008
Location: Toronto,Canada
Posts: 606
|
|
I usually do the same trick, output to textfile and process it for presentation. I will appreciate when you will do that.
My surprise is that why IBM has not provided a view like may other useful views. Is there any place where we can suggest IBM for future versions.
I can do a lot easy scripting in windows native .BAT scripts and also VBScript system scripts.
Regards
|
|

06-09-10, 11:53
|
|
Registered User
|
|
Join Date: Jan 2003
Posts: 3,575
|
|
|
|

06-09-10, 12:50
|
|
Registered User
|
|
Join Date: Nov 2005
Location: IL
Posts: 554
|
|
hmm, I guess I can go back to sleep  ya'll good night
Thanks Andy
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
DB2 v9.1.0.2 os 5.3.0.0
|
|

06-09-10, 19:51
|
|
∞∞∞∞∞∞
|
|
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
|
|
Quote:
Originally Posted by Cougar8000
good night
|
sleep tight
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|