From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
Cc: | Justin Pryzby <pryzby(at)telsasoft(dot)com>, gkokolatos(at)pm(dot)me, pgsql-hackers(at)postgresql(dot)org, Tatsuro Yamada <tatsuro(dot)yamada(dot)tf(at)nttcom(dot)co(dot)jp> |
Subject: | Re: v13: show extended stats target in \d |
Date: | 2020-09-01 21:22:42 |
Message-ID: | 20200901212242.hgjpy4wswibjee4f@development |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Sep 01, 2020 at 05:08:25PM -0400, Alvaro Herrera wrote:
>+1 on fixing this, since the ability to change stats target is new in
>pg13.
>
>On 2020-Aug-31, Justin Pryzby wrote:
>
>> Maybe it should have a comma, like ", STATISTICS %s"?
>
>It does need some separator. Maybe a comma is sufficient, but I'm not
>sure: that will fail when we add cross-relation stats, because the
>FROM clause will have more relations and possibly have commas too.
>
> Table "public.ab1"
> Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
>--------+---------+-----------+----------+---------+---------+--------------+-------------
> a | integer | | | | plain | |
> b | integer | | | | plain | |
>Statistics objects:
> "public"."ab1_a_b_stats" (ndistinct, dependencies, mcv) ON a, b FROM ab1
>
>
>> Also, now I wonder if CREATE STATISTICS should support some syntax to set the
>> initial target. Like:
>>
>> |CREATE STATISTICS abstats ON a,b FROM child.abc_202006 WITH(STATISTICS 111);
>
>Umm, if true (on which I'm not sold), maybe it should appear in the
>parenthesized list that currently is just the stats type list:
>
> |CREATE STATISTICS abstats (STATISTICS 111) ON a,b FROM child.abc_202006;
>
>I'm not really convinced we need this.
>
Me neither. IMHO it's somewhat similar to per-column statistics target,
where we don't allow specifying that in CREATE TABLE and you have to do
ALTER TABLE ... ALTER COLUMN ... SET STATISTICS n;
as a separate step.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2020-09-01 21:30:11 | Re: Additional Chapter for Tutorial |
Previous Message | Tomas Vondra | 2020-09-01 21:19:30 | Re: Disk-based hash aggregate's cost model |