Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Interbase query progress...

0 views
Skip to first unread message

Jason Ryan

unread,
Sep 9, 2003, 4:54:25 AM9/9/03
to
Hi,

I've scoured the internet and google for a solution to showing the progress
of a query or stored procedure and have not come across a solution and was
wondering if anyone here has a solution?

Any help would grateful!

Jason

Martijn Tonies

unread,
Sep 9, 2003, 5:40:31 AM9/9/03
to
Hi Jason,

> I've scoured the internet and google for a solution to showing the progress
> of a query

What progress? A query is either:

1) finished
2) not finished (yet)

>or stored procedure and have not come across a solution and was

Again, what progress?

If you have multiple statements in your EXECute procedure, there is
one way to get "some sort" of progress feedback:

Create a SELECTable stored procedure instead and don't use
EXEC, but SELECT to start it.

CREATE PROCEDURE myproc ( ... ) RETURNS (PROGRESS: SMALLINT)
AS
BEGIN
PROGRESS := 0;
// step 1
PROGRESS := PROGRESS + 1;
SUSPEND;
// step 2
PROGRESS := PROGRESS + 1;
SUSPEND;
etc...
END

Now, if you do a:

select * from myproc ( ... input values )
while not EOF
do begin
// on each iteration, another step is done
end;

--

With regards,

Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com


Wayne Niddery [TeamB]

unread,
Sep 9, 2003, 10:33:28 AM9/9/03
to
Jason Ryan wrote:
>
> I've scoured the internet and google for a solution to showing the
> progress of a query or stored procedure and have not come across a
> solution and was wondering if anyone here has a solution?

If your query is taking so long it needs a progress gauge, perhaps we can
help you improve your query.

--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: http://www.logicfundamentals.com/RADBooks.html
"It is error alone which needs the support of government. Truth can
stand by itself." - Thomas Jefferson


Jason Ryan

unread,
Sep 10, 2003, 4:38:20 AM9/10/03
to

> What progress? A query is either:
>
> 1) finished
> 2) not finished (yet)
>

I understand that, but users dont appreciate knowing the percentage done.

>
> ....snip store procedure example...
>

Thats worked a treat, it provides good feedback for the user.

Thanks for you help,
Jason


Jason Ryan

unread,
Sep 10, 2003, 4:40:43 AM9/10/03
to
> If your query is taking so long it needs a progress gauge, perhaps we can
> help you improve your query.
>

Not all query will ever run in a blink of an eye and users need feedback so
they can see how long something is roughly going to take, even if a query
takes only 10 seconds to run the user in my opinion should be able to see
this some how with a percentage gauge, e.g. DBISAM provides a good
percentage gauge for queries.

Jason

0 new messages