Re: $sysmetric 'Session Count' != Count(*) from v$session;

From: Jonathan Lewis <jlewisoracle_at_gmail.com>
Date: Wed, 9 Mar 2022 22:47:23 +0000
Message-ID: <CAGtsp8mmzoyAa0N0uo1D2kzNjDM-kznmUMawu4+5PZY_8dt_cg_at_mail.gmail.com>



The second x$ksuse should have been v$session.

Regards
Jonathan Lewis

On Wed, 9 Mar 2022 at 20:04, Jonathan Lewis <jlewisoracle_at_gmail.com> wrote:

>
> It looks like the value in v$sysmetric matches the current_utilization in
> v$resource_limit, and that may be derived as the count from x$ksuse where
> bitand(ksspaflg,1) != 0, which is one predicate short of x$ksuse which also
> tests for bitand(ksuseflg,1)!=0
>
> Regards
> Jonathan Lewis
>
>
> On Wed, 9 Mar 2022 at 18:55, kyle Hailey <kylelf_at_gmail.com> wrote:
>
>>
>> Anyone know why the following two are different?
>>
>> SQL> select metric_name, value from v$sysmetric where metric_name = 'Session Count';
>>
>> METRIC_NAME VALUE
>> ---------------------------------------------------------------- ----------
>> Session Count 84
>>
>> SQL>
>> SQL> select Count(*) from v$session;
>>
>> COUNT(*)
>> ----------
>> 58
>>
>>
>> Thanks
>>
>> Kyle
>>
>>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Mar 09 2022 - 23:47:23 CET

Original text of this message