Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: max concurrent record query

Re: max concurrent record query

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Tue, 22 Jun 1999 16:15:45 -0700
Message-ID: <37701921.83C3A94@exesolutions.com>


> Anyways, here's the gist of the problem: one of the requests that came in
> is to know what the maximum number of users that were logged in at any
> one time, and how many were there.

How about creating a results table and putting insert triggers on each of your two existing tables. The results table could have one field for the date, one for the time interval and one for total users. A person logging on would cause the counter for that date and time segment to be incremented. Someone logging off would decrement the same field.

An alternative would be to just perform a count from v$session at some point in the five minute interval and save the total number of records to a report table.

select count(*)
from v$session
where username is not null;

Daniel A. Morgan Received on Tue Jun 22 1999 - 18:15:45 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US