Re: integrate pg_upgrade analyze_new_cluster.sh into vacuumdb

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: integrate pg_upgrade analyze_new_cluster.sh into vacuumdb
Дата
Msg-id CA+U5nMJZ+x=yRAEUMPu4m=TSoAF7yWLNAKZ-Xvz7EqH+PJhTxA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: integrate pg_upgrade analyze_new_cluster.sh into vacuumdb  (Andres Freund <andres@2ndquadrant.com>)
Ответы Re: integrate pg_upgrade analyze_new_cluster.sh into vacuumdb  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 4 April 2014 16:01, Andres Freund <andres@2ndquadrant.com> wrote:

>> +             const char *stage_commands[] = {
>> +                     "SET default_statistics_target=1; SET vacuum_cost_delay=0;",
>> +                     "SET default_statistics_target=10; RESET vacuum_cost_delay;",
>> +                     "RESET default_statistics_target;"

> This whole thing won't work for relations with per-column statistics
> targets btw...

Yes, agreed. Plus I would note that this makes no difference at all
for very small tables since the sample will be big enough even with
stats_target=1.

ISTM that this is the way ANALYZE should work when run on a table that
has never been analysed before. Let's just do this logic within
ANALYZE and be done.

Suggest logic if not ANALYZEd before && table is not small && stats_target is
default then AnalyzeInStages()
otherwise just do one ANALYZE pass

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Window function optimisation, allow pushdowns of items matching PARTITION BY clauses
Следующее
От: Marko Kreen
Дата:
Сообщение: Re: Problem with txid_snapshot_in/out() functionality