Re: Long query, ask for progress
From: joel garry <joel-garry_at_home.com>
Date: Wed, 26 Jan 2011 08:48:25 -0800 (PST)
Message-ID: <0c986e11-8f64-4c04-854b-31498abdec21_at_e9g2000prn.googlegroups.com>
On Jan 25, 11:44 pm, Andreas Mosmann <mosm..._at_expires-31-01-2011.news- group.org> wrote:
> Hi,
>
> I work on Oracle 11 and sometimes there are queries, that need hours to
> be performed.
> is there a way to find out the progress of a special query within
> another session?
>
> pseudo:
>
> AsynchronSession:=StartSessionAsynchron(VeryLongQuery);
> AnotherSession:=StartSynchronSession();
> While AsynchronSession.IsRunning do begin
> PrintResult(AnotherSession.StartQuery(QueryToFindOutProgress));
> Wait(60 sek);
> end;
>
> Thank you
> Andreas
>
> --
> wenn email, dann AndreasMosmann <bei> web <punkt> de
Date: Wed, 26 Jan 2011 08:48:25 -0800 (PST)
Message-ID: <0c986e11-8f64-4c04-854b-31498abdec21_at_e9g2000prn.googlegroups.com>
On Jan 25, 11:44 pm, Andreas Mosmann <mosm..._at_expires-31-01-2011.news- group.org> wrote:
> Hi,
>
> I work on Oracle 11 and sometimes there are queries, that need hours to
> be performed.
> is there a way to find out the progress of a special query within
> another session?
>
> pseudo:
>
> AsynchronSession:=StartSessionAsynchron(VeryLongQuery);
> AnotherSession:=StartSynchronSession();
> While AsynchronSession.IsRunning do begin
> PrintResult(AnotherSession.StartQuery(QueryToFindOutProgress));
> Wait(60 sek);
> end;
>
> Thank you
> Andreas
>
> --
> wenn email, dann AndreasMosmann <bei> web <punkt> de
v$session_longops is about it as far as built-in, I think if it doesn't do that for you you'll have to write your own.
The creaky old 4GL I work on has always had an automatic progress bar that would come up for reports running longer than some minimum, but that's because it figures out beforehand how many rows it will deal with, then figures the rate while running. It confuses users when there is a multistep process and each has a progress bar (and the programmer forgets to turn it off).
jg
-- _at_home.com is bogus. http://news.techworld.com/applications/3258163/oracle-nominates-user-group-to-fill-apache-java-committee-spot/Received on Wed Jan 26 2011 - 10:48:25 CST