dbTalk Databases Forums  

Rates of Change....

comp.databases.sybase comp.databases.sybase


Discuss Rates of Change.... in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Madison Pruet
 
Posts: n/a

Default Rates of Change.... - 06-28-2003 , 01:11 PM






Hi,

Is there an easy way to determine the rate of change for table? I realize
that I could do periodic select count(*) from XXX, but that would only
determine the size of the table. It would ignore updates.

What I'd really like to do would be able to determine the number of non-read
operations over a table so that I can determine the rate of change for that
table.

Thanks for any help..



Reply With Quote
  #2  
Old   
Joseph Weinstein
 
Posts: n/a

Default Re: Rates of Change.... - 06-28-2003 , 01:38 PM






Rate of change implies count of changes per unit of time. The way you could do this
is by having a change table with a count column and a datetme column. An insert
trigger on the data table will get the current time, and if it's less than one minute
later than the latest datetime stored in the change table, the trigger incrments the count
column of that latest change table column with the count of the currently changing rows,
otherwise the trigger makes a new row in the change table with the current time and a
count equal to the current count of changed rows in the data table.

Joe Weinstein at BEA

Madison Pruet wrote:

Quote:
Hi,

Is there an easy way to determine the rate of change for table? I realize
that I could do periodic select count(*) from XXX, but that would only
determine the size of the table. It would ignore updates.

What I'd really like to do would be able to determine the number of non-read
operations over a table so that I can determine the rate of change for that
table.

Thanks for any help..


Reply With Quote
  #3  
Old   
Madison Pruet
 
Posts: n/a

Default Re: Rates of Change.... - 06-28-2003 , 02:07 PM



Thanks.

I'd prefer to find some way to do this without having to impact user
application performance, so would rather avoid having triggers.


"Joseph Weinstein" <joe.remove_this (AT) bea (DOT) com.remove_this> wrote

Quote:
Rate of change implies count of changes per unit of time. The way you
could do this
is by having a change table with a count column and a datetme column. An
insert
trigger on the data table will get the current time, and if it's less than
one minute
later than the latest datetime stored in the change table, the trigger
incrments the count
column of that latest change table column with the count of the currently
changing rows,
otherwise the trigger makes a new row in the change table with the current
time and a
count equal to the current count of changed rows in the data table.

Joe Weinstein at BEA

Madison Pruet wrote:

Hi,

Is there an easy way to determine the rate of change for table? I
realize
that I could do periodic select count(*) from XXX, but that would only
determine the size of the table. It would ignore updates.

What I'd really like to do would be able to determine the number of
non-read
operations over a table so that I can determine the rate of change for
that
table.

Thanks for any help..




Reply With Quote
  #4  
Old   
Jason
 
Posts: n/a

Default Re: Rates of Change.... - 07-06-2003 , 04:57 AM



Madison Pruet wrote:
Quote:
Thanks.

I'd prefer to find some way to do this without having to impact user
application performance, so would rather avoid having triggers.


"Joseph Weinstein" <joe.remove_this (AT) bea (DOT) com.remove_this> wrote in message
news:3EFDE0B5.9B3AB7DD (AT) bea (DOT) com.remove_this...

Rate of change implies count of changes per unit of time. The way you

could do this

is by having a change table with a count column and a datetme column. An

insert

trigger on the data table will get the current time, and if it's less than

one minute

later than the latest datetime stored in the change table, the trigger

incrments the count

column of that latest change table column with the count of the currently

changing rows,

otherwise the trigger makes a new row in the change table with the current

time and a

count equal to the current count of changed rows in the data table.

Joe Weinstein at BEA

Madison Pruet wrote:


Hi,

Is there an easy way to determine the rate of change for table? I

realize

that I could do periodic select count(*) from XXX, but that would only
determine the size of the table. It would ignore updates.

What I'd really like to do would be able to determine the number of

non-read

operations over a table so that I can determine the rate of change for

that

table.

Thanks for any help..



If your using 12.5.0.3 or later, you could use the new mon tables.....



Reply With Quote
  #5  
Old   
Mariano Corral
 
Posts: n/a

Default Re: Rates of Change.... - 07-08-2003 , 01:43 PM



"Madison Pruet" <mpruet (AT) attbi (DOT) com> wrote:
Quote:
Is there an easy way to determine the rate of change for table? I realize
that I could do periodic select count(*) from XXX, but that would only
determine the size of the table. It would ignore updates.

What I'd really like to do would be able to determine the number of non-read
operations over a table so that I can determine the rate of change for that
table.
Another way is auditing. With
sp_audit 'update', 'ALL', 'OWNER.TABLE', 'on'
sp_audit 'insert', 'ALL', 'OWNER.TABLE', 'on'
sp_audit 'delete', 'ALL', 'OWNER.TABLE', 'on'
you'll get a record of every update, insert and delete statement
to the table. This doesn't record the number of rows affected.

Regards,
Mariano Corral


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.