> You might want to take a look at this:
> http://wiki.postgresql.org/wiki/Submitting_a_Patch

I will; I'm sorry it wasn't in the proper format. It was just a proof of 
concept, I guess I should have talked about it before even sending the patch.


> As to the content of the patch, I think that what you are
> doing is
> comparing the actual number of "operations" with the
> expected number
> of operations.  If that's correct, I'm not sure it's
> really all that
> useful, because it will only give you accurate
> percentage-of-completion information when the estimates are
> correct.
> But when the estimates are correct, you probably have a
> pretty good
> idea how long the query will take to run anyway.  

That would be a first step. Having an idea of how much a query "progressed" is 
very important for long-running queries. It's like copying files: even if you 
have a rough idea of how much time a copy will take, having an interface that 
tells you the percentage done is quite useful (IMHO).

> When
> the estimates
> are off, you'll find that the actual number of operations
> is more than
> the expected number of operations, but that won't really
> tell you how
> far you have to go.

The second phase would be using histograms to help refine the statistics at 
runtime.


> The only other use case I can think of for functionality of
> this type
> is some kind of dashboard view on a system with very
> long-running
> queries, where you want to see how far you have yet to go
> on each one
> (maybe to approximate when you can submit the next one)
> without having
> detailed knowledge of how expensive each individual query
> was project
> to be.  But that's a pretty narrow use case

I don't think it's that narrow: it is important, for long running queries, to 
know how far the query processed (the user wants to know how much of a query 
has yet to be executed). That's why you find so many papers on query progress 
indicators.
The real problem is that they don't give you a solution :)


> Greg Stark was (is?) working on a way to get
> EXPLAIN-ANALYZE type
> statistics on running queries; you might want to take a
> look at some
> of that work and see what you think.
> 
> http://wiki.postgresql.org/wiki/Greg_Stark%27s_Development_Projects#EXPLAIN_queries_in_progress
> 


That's interesting. I'll take a look!

Thank you very much for your comments.

Is anyone interested in such a progress indicator???






-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to