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
> 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
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
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
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