Re: Query progress indication - an implementation - Mailing list pgsql-hackers

From Greg Stark
Subject Re: Query progress indication - an implementation
Date
Msg-id 407d949e0907020453g314f96f2w25262a4a1ed1c301@mail.gmail.com
Whole thread Raw
In response to Re: Query progress indication - an implementation  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
On Thu, Jul 2, 2009 at 2:32 AM, Bruce Momjian<bruce@momjian.us> wrote:
> I think the only resonable solution would be to consider the estimated
> cost of each node and then compute what percentage complete each node
> is.
>

Well you can do better for some nodes. A sequential scan for example
can tell you exactly what percentage of the way through its scan it
is. A sort node that's fnished the sort can produce an value based on
both the estimate of the relative costs of the sort vs reading the
results and the actual percentage progress reading the results.

So I think it has to come down to another ExecProcNode method the way
I had it arranged in my patch that actually implemented this.

I was partly waiting for the other patch which multiplexed signals
onto fewer actual unix signals to go through. And for XML explain
plans to go through. Once we have those then I think my patch is
actually nearly there, it just needs some additional tweaking of the
heuristics for more plan types.

Then comes the fun part of figuring out a useful UI for psql and
pgadmin. Personally I'm happy for psql to just print the plan whenever
the user hits siginfo. I think an apt-style curses progress bar would
be unecessarily heavyweight for the lightweight vision I have for
psql. But I know others have more ambitious visions for psql.



-- 
greg
http://mit.edu/~gsstark/resume.pdf


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: First CommitFest: July 15th
Next
From: Robert Haas
Date:
Subject: Re: HEAD is open for 8.5 development