RE: Monitor Informix Longtx
Posted in 1999
>===== Original Message From Rudy Fernandes <rferdy@americasm01.nt.com> =====
>Did not work for me (7.31uc2, HP10.20). But it was fascinating enough to
tinker with.
>Modified like below, it worked fine on my instance.
>
>SELECT
> (select cf_effective f
> from sysconfig
> where cf_name = 'LTXHWM') LTXHWM,
> ((
> select sum(size)
> FROM syslogs
> WHERE uniqid >= (
> SELECT MIN(tx_loguniq)
> FROM systrans
> WHERE tx_loguniq > 0)
> and uniqid <= (
> SELECT uniqid
> FROM syslogs
> WHERE is_current = 1)
> )> / (select sum(size) from syslogs) *100) CURRENT_USED
>FROM systables
>WHERE tabname = 'systables';
>
>Rudy
>
>William Rice wrote:
>
>> To give you the percent of the syslogs which are used between now
>> and the start of the longest transaction you can use this query.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This was supposed to say that it gave you the percent of syslogs
not used between now and the start of the least recent transaction :)
If it doesnt work for that please tell me :)
>>
>> SELECT (
>> (
>> SELECT SUM(size-used)
>> FROM syslogs
>> WHERE uniqid >= (
>> SELECT MIN(tx_loguniq)
>> FROM systrans
>> WHERE tx_loguniq > 0
>> )
>> )
>> +
>> (
>> SELECT SUM(size)
>> FROM syslogs
>> WHERE uniqid < (
>> SELECT MIN(tx_loguniq)
>> FROM systrans
>> WHERE tx_loguniq > 0
>> )
>> )
>> )
>> / (select sum(size) from syslogs) *100
>> FROM systables
>> WHERE tabid=1
>>
>> Will Rice
Will Rice
------------------------------------------------------------
This e-mail has been sent to you courtesy of OperaMail, as a free service from
Opera Software, makers of the award-winning Web Browser, Opera. Visit us at
http://www.opera.com/ or our portal at: http://www.myopera.com/ Your free e-mail
account is waiting at: http://www.operamail.com/
------------------------------------------------------------