Categories

A sample text widget

Etiam pulvinar consectetur dolor sed malesuada. Ut convallis euismod dolor nec pretium. Nunc ut tristique massa.

Nam sodales mi vitae dolor ullamcorper et vulputate enim accumsan. Morbi orci magna, tincidunt vitae molestie nec, molestie at mi. Nulla nulla lorem, suscipit in posuere in, interdum non magna.

db2pd command script – busiest tables

Have you ever wondered what the busiest tables are in your database?

The db2pd command using -tcbstats can provide a lot of insight about what is happening in your tables.  The below is a simple script that you can run on the command line or put in a ksh script to tell you the busiest tables.  The sample script below will tell you what tables have the most inserts, but it can be adjusted to tell you other pieces of information such as updates, deletes and reads.

You can refer to the manual for db2pd – in the manual, you can see where other stats are you can analyze.   Change the $10 to another value for other stats.

11=Updates
12=Deletes
8=Reads

db2pd -db dbname -tcbstats| awk '/TCB Table Stats/ { x =1} x==1 { print}' | awk '/^0x/ { print $10, $2}' | sort -rn| head -15

Leave a Reply

Buy Generic Viagra USA
Where TO Buy Viagra Online
Buy Viagra Where
Cheap Cheap Viagra
Line Viagra
Buy Discount Viagra
Cheapest viagra online Pills
Buy Viagra Sample
Cheap Viagra Online
Cheap Viagra FAST Shipping
Viagra for Sale
Buy Viagra New York
Cheap Websites For Viagra
Viagra FOR Sales Online
Cheapest Viagra Prices
Cheap Viagra Pills