Re: progress report for ANALYZE

From: Amit Langote <amitlangote09(at)gmail(dot)com>
To: Tatsuro Yamada <tatsuro(dot)yamada(dot)tf(at)nttcom(dot)co(dot)jp>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: progress report for ANALYZE
Date: 2019-11-19 01:57:39
Message-ID: CA+HiwqHke2YX8SttKgC7DLTZbdcH=6584CW-1c3kYYRufSosag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Yamada-san,

Thanks for working on this.

On Wed, Nov 6, 2019 at 2:50 PM Tatsuro Yamada
<tatsuro(dot)yamada(dot)tf(at)nttcom(dot)co(dot)jp> wrote:
> I revised the patch as following because I realized counting the types of ext
> stats is not useful for users.
>
> - Attached new patch counts a number of ext stats instead the types of ext stats.
>
> So we can see the counter goes to "2", if we created above ext stats (pg_ext1 and
> pg_ext2) and analyzed as you wrote. :)

I have looked at the patch and here are some comments.

I think include_children and current_relid are not enough to
understand the progress of analyzing inheritance trees, because even
with current_relid being updated, I can't tell how many more there
will be. I think it'd be better to show the total number of children
and the number of children processed, just like
pg_stat_progress_create_index does for partitions. So, instead of
include_children and current_relid, I think it's better to have
child_tables_total, child_tables_done, and current_child_relid, placed
last in the set of columns.

Also, inheritance tree stats are created *after* creating single table
stats, so I think that it would be better to have a distinct phase
name for that, say "acquiring inherited sample rows". In
do_analyze_rel(), you can select which of two phases to set based on
whether inh is true or not. For partitioned tables, the progress
output will immediately switch to this phase, because partitioned
table itself is empty so there's nothing to do in the "acquiring
sample rows" phase.

That's all for now.

Thanks,
Amit

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gareth Palmer 2019-11-19 02:34:41 Re: [PATCH] Implement INSERT SET syntax
Previous Message Peter Geoghegan 2019-11-19 01:26:37 Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.