Re: PG planning randomly ?
От | Tom Lane |
---|---|
Тема | Re: PG planning randomly ? |
Дата | |
Msg-id | 8661.1204063173@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: PG planning randomly ? ("Scott Marlowe" <scott.marlowe@gmail.com>) |
Список | pgsql-performance |
"Scott Marlowe" <scott.marlowe@gmail.com> writes: > On Tue, Feb 26, 2008 at 11:12 AM, Laurent Raufaste <analogue@glop.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
В списке pgsql-performance по дате отправления: