Re: ANALYZE command progress checker

From: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
To: vinayak <Pokale_Vinayak_q3(at)lab(dot)ntt(dot)co(dot)jp>
Cc: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, David Steele <david(at)pgmasters(dot)net>, David Fetter <david(at)fetter(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ANALYZE command progress checker
Date: 2017-03-23 06:04:32
Views: Raw Message | Whole Thread | Download mbox
Lists: pgsql-hackers

On Wed, Mar 22, 2017 at 8:11 PM, vinayak <Pokale_Vinayak_q3(at)lab(dot)ntt(dot)co(dot)jp>

> On 2017/03/21 21:25, Haribabu Kommi wrote:
> On Tue, Mar 21, 2017 at 3:41 PM, vinayak <Pokale_Vinayak_q3(at)lab(dot)ntt(dot)co(dot)jp>
> wrote:
>> Thank you for testing the patch on Windows platform.
> Thanks for the updated patch.
> It works good for a normal relation. But for a relation that contains
> child tables,
> the PROGRESS_ANALYZE_NUM_ROWS_SAMPLED produces wrong results.
> Thank you for reviewing the patch.
> The attached patch implements a way to report sample rows count from
> acquire_sample_rows() even if called for child tables.
> How about adding another phase called PROGRESS_ANALYZE_PHASE_
> and set this phase only when it is an inheritance analyze operation. And
> adding
> some explanation of ROWS_SAMPLED phase about inheritance tables
> how these sampled rows are calculated will provide good analyze progress of
> relation that contains child relations also.
> I have added the phase called PROGRESS_ANALYZE_PHASE_
> I have also updated the documentation.

Thanks for the updated patch. I will check it.

> The ANALYZE command takes long time in computing statistics phase.So I
> think we can add some column or phase so that user can easily understand
> the progress.
> How about adding new column like "num_rows_processed" will compute the
> statistics of specified column?

I prefer a column with rows processed instead of a phase.
Because we already set the phase of compute stats and showing
the progress there will number of rows processed will be good.

> How about separate the computing "inheritance statistics" phase from the
> computing regular "single table" statistics.
> Comment?

Yes, this will be good to show both that states of inheritance of sampled
rows and
compute inheritance stats, so that it will be clearly visible to the user
the current

Hari Babu
Fujitsu Australia

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2017-03-23 06:42:34 Re: Measuring replay lag
Previous Message Masahiko Sawada 2017-03-23 05:54:02 Re: GUC for cleanup indexes threshold.