Re: Question on select count()

From: <sybrandb_at_yahoo.com>
Date: 18 Aug 2004 00:55:51 -0700
Message-ID: <a1d154f4.0408172355.72a0efc3_at_posting.google.com>


jpbelang_at_hotmail.com (JP Belanger) wrote in message news:<b399d6ce.0408170627.12849129_at_posting.google.com>...
> afilonov_at_yahoo.com (Alex Filonov) wrote in message news:<336da121.0408161150.2c0d78d9_at_posting.google.com>...
> >
> >
> > If you are trying to restrict number of rows to <= 50, there is something
> > wrong with database design. It'll help if you post what you are trying
> > to achieve (in simple words)...
>
> Are you saying I was unclear ? :)
>
> I keep track of sessions in a database. Exceeding a fixed number of
> sessions should not be allowed.
>
> 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.

If you want a maximum number of session, just set the processes parameter in init.ora appropiately.
If you want a maximum number of sessions per user, look up the CREATE PROFILE command in the Oracle documentation. You are now trying to hack yourself out, where the database can indeed help you.

Sybrand Bakker
Senior Oracle DBA Received on Wed Aug 18 2004 - 09:55:51 CEST

Original text of this message