"Scott Marlowe" <[EMAIL PROTECTED]> writes:
> On Tue, Feb 26, 2008 at 11:12 AM, Laurent Raufaste <[EMAIL PROTECTED]> wrote:
>> I tried increasing the stats target with the command:
>> SET default_statistics_target=1000 ;
>> That's the command I launched before executing the ANALYZE showed in
>> the previous mail.

> You're doing it wrong.  The default target affects newly created
> columns / tables.  You need to use alter table to change a stats
> target after creation.  Like so:
> alter table abc alter column xyz set statistics 100;

That's completely incorrect.  If the column doesn't have a specific
stats target (indicated by -1 in attstattarget, which Laurent showed
us was the case), then ANALYZE will use the current value of
default_statistics_target.  The table-creation-time value of that
parameter isn't relevant at all.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Reply via email to