Skip site navigation (1) Skip section navigation (2)

Re: suggestion: set default statistics to 100 for numerics

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Joseph Shraibman <jks(at)selectacast(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: suggestion: set default statistics to 100 for numerics
Date: 2004-07-01 22:37:53
Message-ID: 20040701223753.GC13816@dcc.uchile.cl (view raw or flat)
Thread:
Lists: pgsql-hackers
On Wed, Jun 30, 2004 at 10:56:53PM -0400, Joseph Shraibman wrote:
> Seeing how small storage for a number type is compared to a text type, 
> and seeing how they tend to be queried on a lot, shouldn't it be 
> reasonable for the default stats number for numerics to be 100 instead 
> of 10?

The problem is not only storage space, but also the optimizer runtime;
which would have to munge the larger amount of data ... not sure if this
is critical but enlarging it by default for all numeric columns may not
be desirable.

Anyway ISTM a better rule would be enlarging the default stats number
for columns that are part of an index, rather than using the datatype.

-- 
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Porque Kim no hacia nada, pero, eso sí,
con extraordinario éxito" ("Kim", Kipling)


In response to

Responses

pgsql-hackers by date

Next:From: Alvaro HerreraDate: 2004-07-01 22:38:41
Subject: Re: Nested Transactions, Abort All
Previous:From: Peter EisentrautDate: 2004-07-01 22:11:09
Subject: Re: Adding column comment to information_schema.columns

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group