Re: Question on select count()

From: JP Belanger <jpbelang_at_hotmail.com>
Date: 18 Aug 2004 07:54:06 -0700
Message-ID: <b399d6ce.0408180654.3155d2a4_at_posting.google.com>


afilonov_at_yahoo.com (Alex Filonov) wrote in message news:<336da121.0408171322.516568f2_at_posting.google.com>...

> You mean, each session is registering itself in some table? Maybe you
> can use v$session virtual table?

I need to read up :)

> Another way is to create a table with fixed number of rows. Would
> create a lot of headache: you need to update a row when session
> is registering itself and update again when it's de-registering
> (and you need a monitor which would detect dead session and
> de-register them). Another problem with this design is that session needs
> to connect to database to try to register itself...

Essentially had the same thoughts you had about this one.

>
> > The reason I do not keep the cound in the Java application was that I
> > wanted to keep the application stateless, to allow for simple load
> > balancing. I thought the database could help me, but at the same
> > time, I think helping me, the database would sacrifice a lot of
> > performance.
>
> Maybe not. Depends on what kind of operations do you do against the
> database.
> BTW, do you really need to restrict the number of sessions?

Hehe. It was required for our application's licensing. Of course, when you then ask what we should do with excess session, the answer, as it very often is, was "let them go through anyways".

> And, is it possible to use restrictions built-in into Oracle, like
> restrictions on number of sessions, processes or transactions?

We may need to support many more sessions (100 000's). So I'll have to read more on this.

Thanks for everybody's help. Received on Wed Aug 18 2004 - 16:54:06 CEST

Original text of this message