Database Tables
Posted in 2010
Topics: General Discussion
Does anyone know of an easy way to find out WHEN(date?, days?, whatever) a table was last accessed (read or write)? I'm trying to find out which tables are completely unused or inactive in a particular database. Any shortcuts out there?? Appreciate any help!
You can see how many rows have been selected, inserted, updated, delete by
selecting on the sysmaster:sysptprof table. This is informix is displayed
since
the informix server startup or the last onstat -z command. To find this
date run the following command.
select DBINFO('UTC_TO_DATETIME',sh_pfclrtime) from sysmaster:sysshmvals
John F. Miller III
STSM, Support Architect
miller3@us.ibm.com
503-578-5645
IBM Informix Dynamic Server (IDS)
ids-bounces@iiug.org wrote on 06/04/2010 07:20:21 AM:
> [image removed]
>
> Database Tables [20292]
>
> DANUTE MILLER
>
> to:
>
> ids
>
> 06/04/2010 07:21 AM
>
> Sent by:
>
> ids-bounces@iiug.org
>
> Please respond to ids
>
> Does anyone know of an easy way to find out WHEN(date?, days?, whatever)
a
> table was last accessed (read or write)? I'm trying to find out which
tables
> are completely unused or inactive in a particular database.
>
> Any shortcuts out there?? Appreciate any help!
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
If you have tablespace statistics enabled you can query the
sysmaster:sysptprof table to see how many reads and writes have accessed the
table's pages (join to sysmaster:systabnames to get/filter database and
tablename). If you zero out the stats (onstat -z) and check sometime later
the stats will be since the zeroing point in time. If you are using 11.50
(always good to post your version and platform information for any post
here) and have not disabled them, the built-in sensors will be gathering
stats from this table over time and OAT will display the data on a graph for
you.
Art
Art S. Kagel
Advanced DataTools (www.advancedatatools.com)
IIUG Board of Directors (art@iiug.org)
Disclaimer: Please keep in mind that my own opinions are my own opinions and
do not reflect on my employer, Advanced DataTools, the IIUG, nor any other
organization with which I am associated either explicitly, implicitly, or by
inference. Neither do those opinions reflect those of other individuals
affiliated with any entity with which I am affiliated nor those of the
entities themselves.
On Fri, Jun 4, 2010 at 10:20 AM, DANUTE MILLER <dmiller@bcsigroup.com>wrote:
> Does anyone know of an easy way to find out WHEN(date?, days?, whatever) a
> table was last accessed (read or write)? I'm trying to find out which
> tables
> are completely unused or inactive in a particular database.
>
> Any shortcuts out there?? Appreciate any help!
>
>
>
>
*******************************************************************************
> Forum Note: Use "Reply" to post a response in the discussion forum.
>
>
--000e0cd6a9865bfb58048836ac60
Sorry about that, yes, I am on 11.50 on RH5. I knew about getting the reads, writes, etc, but it last the "last accessed time" that I really needed! Great, I'll give that a try. I have not zero'd out so I should have a pretty good idea.
Thanks, I'll try it.