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

Home -> Community -> Usenet -> c.d.o.server -> Re: V$SESSION_LONGOPS sofar/totalwork *always* = 1 in 10g ?

Re: V$SESSION_LONGOPS sofar/totalwork *always* = 1 in 10g ?

From: Anurag Varma <avoracle_at_gmail.com>
Date: 30 Nov 2006 10:35:22 -0800
Message-ID: <1164911722.016703.217860@h54g2000cwb.googlegroups.com>

Spendius wrote:
> Hi,
> I have a script that's been working for years:
> > select round((sofar/totalwork)*100,2) ||'%' pct,
> > opname, target,
> > round(time_remaining/60, 2) minutes
> > from v$session_longops
> > where round((sofar/totalwork)*100,2) != '100'
> > and sid=&&1
>
> that no more works with 10.2 databases. The following
> > select sid,sofar/totalwork from v$session_longops ;
> ALWAYS returns 1 for sofar/totalwork, even for queries
> running for... several hours.
>
> Is there something wrong with this view now ?
> Thanks.

Just did a quick test and I see it works on the 10.2.0.2 database I tested it on.
Just because a query is running for several hours does NOT mean it would show
up in v$session_longops. If its doing a slooow NL join, it won't show up.
There are other criterias which must be fulfilled before the operation shows up in longops.

If the following test does not show up in longops, then you might have a problem:
Run a full table scan of a huge table (> 10,000 blocks). The scan should show
up in longops.

Anurag Received on Thu Nov 30 2006 - 12:35:22 CST

Original text of this message

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