Re: Query progress indication - an implementation

Поиск
Список
Период
Сортировка
От Scara Maccai
Тема Re: Query progress indication - an implementation
Дата
Msg-id 963607.12753.qm@web24608.mail.ird.yahoo.com
обсуждение исходный текст
Ответ на Query progress indication - an implementation  (Scara Maccai <m_lists@yahoo.it>)
Ответы Re: Query progress indication - an implementation  (Peter Hunsberger <peter.hunsberger@gmail.com>)
Re: Query progress indication - an implementation  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
> 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
beforeeven 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'slike copying files: even if you have a rough idea of how much time a copy will take, having an interface that tells
youthe 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
userwants 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???







В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Query progress indication - an implementation
Следующее
От: Tsutomu Yamada
Дата:
Сообщение: Re: Proposal: More portable way to support 64bit platforms