Show statistics target in \d+

Поиск
Список
Период
Сортировка
Искать

Show statistics target in \d+

От:
Magnus Hagander <magnus@hagander.net>
Дата:
Вложения:
The attached patch adds a column for statistics target when viewing
tables in psql using \d+.

Comments/reivews?

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: Show statistics target in \d+

От:
Cédric Villemain <cedric.villemain.debian@gmail.com>
Дата:
2011/11/4 Magnus Hagander :
> The attached patch adds a column for statistics target when viewing
> tables in psql using \d+.
>
> Comments/reivews?

Interesting, can the ouput be clear on the value being a default or an
explicit stat target ? (not mandatory but I believe I would like to
have it only when the stat target is jnot the default)

>
> --
>  Magnus Hagander
>  Me: http://www.hagander.net/
>  Work: http://www.redpill-linpro.com/
>
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>
>



-- 
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation

Re: Show statistics target in \d+

От:
Magnus Hagander <magnus@hagander.net>
Дата:
On Fri, Nov 4, 2011 at 14:53, Cédric Villemain
 wrote:
> 2011/11/4 Magnus Hagander :
>> The attached patch adds a column for statistics target when viewing
>> tables in psql using \d+.
>>
>> Comments/reivews?
>
> Interesting, can the ouput be clear on the value being a default or an
> explicit stat target ? (not mandatory but I believe I would like to
> have it only when the stat target is jnot the default)

It shows -1 when it's the default.

We could map that to the string "default" if we want, or just NULL, I
guess. Not sure which is best?

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: Show statistics target in \d+

От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Fri, Nov 4, 2011 at 9:34 AM, Magnus Hagander  wrote:
> The attached patch adds a column for statistics target when viewing
> tables in psql using \d+.
>
> Comments/reivews?

"Statistics" doesn't seem like a very clear name for the column header.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Show statistics target in \d+

От:
Magnus Hagander <magnus@hagander.net>
Дата:
On Fri, Nov 4, 2011 at 15:06, Robert Haas  wrote:
> On Fri, Nov 4, 2011 at 9:34 AM, Magnus Hagander  wrote:
>> The attached patch adds a column for statistics target when viewing
>> tables in psql using \d+.
>>
>> Comments/reivews?
>
> "Statistics" doesn't seem like a very clear name for the column header.

Got any ideas for a better one? "Statistics Target" seemed too long to
me, and "Statstarget" not necessarily very user friendly?


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: Show statistics target in \d+

От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Fri, Nov 4, 2011 at 10:09 AM, Magnus Hagander  wrote:
> On Fri, Nov 4, 2011 at 15:06, Robert Haas  wrote:
>> On Fri, Nov 4, 2011 at 9:34 AM, Magnus Hagander  wrote:
>>> The attached patch adds a column for statistics target when viewing
>>> tables in psql using \d+.
>>>
>>> Comments/reivews?
>>
>> "Statistics" doesn't seem like a very clear name for the column header.
>
> Got any ideas for a better one? "Statistics Target" seemed too long to
> me, and "Statstarget" not necessarily very user friendly?

I would prefer "Stats Target" to "Statistics", because I think it's more clear.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: Show statistics target in \d+

От:
Josh Kupershmidt <schmiddy@gmail.com>
Дата:
On Fri, Nov 4, 2011 at 10:05 AM, Magnus Hagander  wrote:
> On Fri, Nov 4, 2011 at 14:53, Cédric Villemain
>> Interesting, can the ouput be clear on the value being a default or an
>> explicit stat target ? (not mandatory but I believe I would like to
>> have it only when the stat target is jnot the default)
>
> It shows -1 when it's the default.
>
> We could map that to the string "default" if we want, or just NULL, I
> guess. Not sure which is best?

I thought -1 was just fine. The ALTER TABLE doc page is clear that -1
means the system default, and having another value may just confuse
users.

Josh

Re: Show statistics target in \d+

От:
Stephen Frost <sfrost@snowman.net>
Дата:
* Magnus Hagander (magnus@hagander.net) wrote:
> On Fri, Nov 4, 2011 at 15:06, Robert Haas  wrote:
> >> Comments/reivews?
> >
> > "Statistics" doesn't seem like a very clear name for the column header.
> 
> Got any ideas for a better one? "Statistics Target" seemed too long to
> me, and "Statstarget" not necessarily very user friendly?

I don't think we need to kill ourselves over making it super
user-friendly.  If they don't know what it is/means, they can go read
the docs. :)  I agree w/ Robert that 'Statistics' is a bad name.  I'd
suggest 'stat_target'.
Thanks,
	Stephen

Re: Show statistics target in \d+

От:
"Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Дата:
Magnus Hagander  wrote:
>>  Interesting, can the ouput be clear on the value being a default
>> or an explicit stat target ? (not mandatory but I believe I would
>> like to have it only when the stat target is jnot the default)
> 
> It shows -1 when it's the default.
> 
> We could map that to the string "default" if we want, or just
> NULL, I guess. Not sure which is best?
I think it would be most useful for it to show as blank, so that
overrides stand out.  NULL seems the best way to do that.
-Kevin

Re: Show statistics target in \d+

От:
Cédric Villemain <cedric.villemain.debian@gmail.com>
Дата:
2011/11/4 Josh Kupershmidt :
> On Fri, Nov 4, 2011 at 10:05 AM, Magnus Hagander  wrote:
>> On Fri, Nov 4, 2011 at 14:53, Cédric Villemain
>>> Interesting, can the ouput be clear on the value being a default or an
>>> explicit stat target ? (not mandatory but I believe I would like to
>>> have it only when the stat target is jnot the default)
>>
>> It shows -1 when it's the default.
>>
>> We could map that to the string "default" if we want, or just NULL, I
>> guess. Not sure which is best?
>
> I thought -1 was just fine. The ALTER TABLE doc page is clear that -1
> means the system default, and having another value may just confuse
> users.

yes, it looks good to me.

>
> Josh
>



-- 
Cédric Villemain +33 (0)6 20 30 22 52
http://2ndQuadrant.fr/
PostgreSQL: Support 24x7 - Développement, Expertise et Formation

Re: Show statistics target in \d+

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Magnus Hagander  writes:
> The attached patch adds a column for statistics target when viewing
> tables in psql using \d+.

> Comments/reivews?

Isn't this going to show -1 most of the time?  Seems rather useless,
not to mention confusing to people who don't know what that means.
		regards, tom lane

Re: Show statistics target in \d+

От:
Magnus Hagander <magnus@hagander.net>
Дата:
On Fri, Nov 4, 2011 at 15:23, Tom Lane  wrote:
> Magnus Hagander  writes:
>> The attached patch adds a column for statistics target when viewing
>> tables in psql using \d+.
>
>> Comments/reivews?
>
> Isn't this going to show -1 most of the time?  Seems rather useless,
> not to mention confusing to people who don't know what that means.

It will, but in the cases where it doesn't, it'll be very useful and
good to have thrown in your face.

Would you find it better if we showed blank (NULL) when it was -1?


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: Show statistics target in \d+

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Magnus Hagander  writes:
> Would you find it better if we showed blank (NULL) when it was -1?

Yeah, I would.  Seems less confusing.
		regards, tom lane

Re: Show statistics target in \d+

От:
Magnus Hagander <magnus@hagander.net>
Дата:
On Fri, Nov 4, 2011 at 16:13, Tom Lane  wrote:
> Magnus Hagander  writes:
>> Would you find it better if we showed blank (NULL) when it was -1?
>
> Yeah, I would.  Seems less confusing.

Adjusted per this, renamed to "Stats target", and applied.


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

FAQ