Re: Odd statistics behaviour in 7.2 - Mailing list pgsql-hackers

From Thomas Lockhart
Subject Re: Odd statistics behaviour in 7.2
Date
Msg-id 3C6A7B1E.EE0BEF92@fourpalms.org
Whole thread Raw
In response to Odd statistics behaviour in 7.2  ("Gordon A. Runkle" <gar@integrated-dynamics.com>)
List pgsql-hackers
> ... sometimes ... 'n_distinct' for this column
> gets a value of '-1' (desireable), and other times a value such as 56596
> or something.
> This is with the default setting for the statistics.
> Doing a 'SET STATISTICS 40' on the column got me to '-0.106047', which
> is better.  But even so, the values do change somewhat over subsequent
> runs of VACUUM ANALYZE.  And sometimes I get the coveted '-1'.

I'm guessing that your table is not randomly populated, so that the new
"statistically sampled ANALYZE" is sometimes getting a good sample (or
at least one with the result you want) and sometimes getting a terrible
one.

Tom?
                    - Thomas


pgsql-hackers by date:

Previous
From: Doug McNaught
Date:
Subject: Re: Connection Pooling
Next
From: Jean-Paul ARGUDO
Date:
Subject: Re: feature request START WITH ... CONNECT BY