Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Tracking Object Usage

3 posts in Product Futures Discussion Last posting was on 2003-07-04 22:09:52.0Z
putnamr Posted on 2003-07-03 02:38:43.0Z
From: putnamr@river.it.gvsu.edu
Date: Wed, 2 Jul 2003 22:38:43 -0400
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: Tracking Object Usage
Message-ID: <02581C4BD022C394000E87D685256D58.000E881E85256D58@webforums>
Lines: 13
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1269
Article PK: 95509

Hello,

I would like to see a new column as part of sysobjects ( last_used_date).
This column would indicate when an object was last used following a
checkpoint. So, basically after a checkpoint completes for a database, any
object that gets used for the first time following the checkpoint and only
for the first time, will have the column last_used_date of sysobjects
updated with the current datetime. Or, maintain this information between
checkpoints in the descriptor for the object and flush the current datetime
of a checkpoint if an object was used between checkpoints.

Thanks,
Ryan Putnam


Allan Grimshaw Posted on 2003-07-04 20:56:44.0Z
Message-ID: <3F05EA0C.ED38C1B2@agricoreunited.com>
Date: Fri, 04 Jul 2003 15:56:44 -0500
From: Allan Grimshaw <agrimshaw@agricoreunited.com>
Organization: AgricoreUnited
X-Mailer: Mozilla 4.78 [en]C-CCK-MCD UGG20011025 (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Subject: Re: Tracking Object Usage
References: <02581C4BD022C394000E87D685256D58.000E881E85256D58@webforums>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: sybase.public.ase.product_futures_discussion
NNTP-Posting-Host: ugg10.unitedgrain.ca 165.23.247.49
Lines: 38
Path: forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1274
Article PK: 95512

With the new monitoring features of ASE 12.5.0.3 you can get this. We use this
SQL,

--
-- This SQL will give you a list of the most used objects
-- since server boot.
-- Must be in the user database to run
-- Set ma.DBID accordingly
--
SELECT
ma.DBID,
ma.ObjectID,
so.name,
ma.IndexID,
si.name,
ma.LogicalReads,
ma.PhysicalReads,
ma.OptSelectCount,
ma.LastOptSelectDate,
ma.UsedCount,
ma.LastUsedDate, <---------------------- ****
ma.Operations
FROM master..monOpenObjectActivity ma, sysobjects so, sysindexes si
where
ma.DBID = 6 and
ma.ObjectID = so.id and
ma.ObjectID = si.id and
ma.IndexID = si.indid and
so.type = "U" and
UsedCount > 0
order by ma.LogicalReads desc

Allan Grimshaw
agrimshaw@agricoreunited.com

putnamr@river.it.gvsu.edu wrote:

> Hello,
>
> I would like to see a new column as part of sysobjects ( last_used_date).
> This column would indicate when an object was last used following a
> checkpoint. So, basically after a checkpoint completes for a database, any
> object that gets used for the first time following the checkpoint and only
> for the first time, will have the column last_used_date of sysobjects
> updated with the current datetime. Or, maintain this information between
> checkpoints in the descriptor for the object and flush the current datetime
> of a checkpoint if an object was used between checkpoints.
>
> Thanks,
> Ryan Putnam


putnamr Posted on 2003-07-04 22:09:52.0Z
From: putnamr@river.it.gvsu.edu
Date: Fri, 4 Jul 2003 18:09:52 -0400
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: Re: Tracking Object Usage
Message-ID: <060761B8E1DEDFA30079C0E085256D59.0077CB8185256D59@webforums>
References: <02581C4BD022C394000E87D685256D58.000E881E85256D58@webforums> <3F05EA0C.ED38C1B2@agricoreunited.com>
Lines: 9
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1275
Article PK: 95514

Hello,

I know you can get sort of get at it using the monitoring options and
storing the data historically, but I want ASE to be able to do it for you
automatically. I don't want to have to capture the statistics from one of
the mon* tables periodically or have to worry about a server crashing and
losing the statistics.

Thanks