From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> |
Cc: | "Laurent Raufaste" <analogue(at)glop(dot)org>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: PG planning randomly ? |
Date: | 2008-02-26 21:59:33 |
Message-ID: | 8661.1204063173@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
"Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com> writes:
> On Tue, Feb 26, 2008 at 11:12 AM, Laurent Raufaste <analogue(at)glop(dot)org> 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
From | Date | Subject | |
---|---|---|---|
Next Message | James Mansion | 2008-02-26 22:15:58 | Re: LISTEN / NOTIFY performance in 8.3 |
Previous Message | Tom Lane | 2008-02-26 21:57:16 | Re: PG planning randomly ? |