Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: max concurrent record query
> 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