Re: Sql question
Posted in 1997
> does anyone have a script that will pull out the tables
> in a database that would have the most read/write activity?
>
> tks
> Ed
>
> edbid @ cobe.com
>
Ed,
This script is from my presentation at the IWUS on Exploring the Sysmaster
database. An articule and more scripts like it are available at my web site.
Regards - Lester
-----------------------------------------------------------------------------
-- Module: @(#)tabprof.sql 1.4 Date: 97/07/18
-- Author: Lester B. Knutsen Email: lester@advancedatatools.com
-- Advanced DataTools Corporation
-- Discription: Displays table IO performance
-----------------------------------------------------------------------------
database sysmaster;
-- Some of the fields are commented out so the display will fit on
-- a 80 column screen
select
dbsname,
tabname,
isreads,
bufreads,
pagreads
-- uncomment the following to show writes
-- iswrites,
-- bufwrites,
-- pagwrites
-- uncomment the following to show locks
-- iswrites,
-- bufwrites,
-- pagwrites
-- uncomment the following to show locks
-- lockreqs,
-- lockwts,
-- deadlks
from sysptprof
order by isreads desc; -- change this sort to whatever you need to monitor.
#############################################################################
# Lester Knutsen lester@advancedatatools.com #
# Advanced DataTools Corporation Voice: 703-256-0267 #
# Grant group privileges for Informix databases with DB Privileges #
# Visit our Web page: www.advancedatatools.com #
# Washington Area Informix User Group: www.iiug.org/~waiug/ #
#############################################################################