Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Getting blocking / waiting sessions info
In article <8kg3a7$89b$1_at_nnrp1.deja.com>,
Sunil <psunil_at_my-deja.com> wrote:
> I want to get session statistics and I have script for that.
> However, the SQL used for getting blocking sessions and waiting
> sessions per sid takes lot of time to execute, especially the second
> one.
> SQL stmts I use for this are :
> 1. select count(*) from dba_waiters group by holding_sessions;
> 2. select count(*) from dba_waiters group by waiting_sessions;
>
> Could anybody please tell me why it's taking long time.
> If this table is not the correct one to get this information, which
> tables should I use to get this information.
>
I dunno which Oracle version you're using but on 8.0.4 you could run
the following:
1.select count(*) from pending_sessions$
2.select count(*) from pending_sub_sessions$
Cheers
JC
> Thanks in advance,
> Sunil.
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Jul 12 2000 - 00:00:00 CDT
![]() |
![]() |