From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: integrate pg_upgrade analyze_new_cluster.sh into vacuumdb |
Date: | 2014-04-13 12:13:16 |
Message-ID: | CA+U5nMJZ+x=yRAEUMPu4m=TSoAF7yWLNAKZ-Xvz7EqH+PJhTxA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 4 April 2014 16:01, Andres Freund <andres(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Marko Kreen | 2014-04-13 12:27:24 | Re: Problem with txid_snapshot_in/out() functionality |
Previous Message | David Rowley | 2014-04-13 11:32:25 | Window function optimisation, allow pushdowns of items matching PARTITION BY clauses |