Re: PG planning randomly ?

Поиск
Список
Период
Сортировка
От Laurent Raufaste
Тема Re: PG planning randomly ?
Дата
Msg-id 669dc9710802260912y7fe58f9epe42fe7eb360119d8@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PG planning randomly ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: PG planning randomly ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: PG planning randomly ?  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-performance
2008/2/26, Tom Lane <tgl@sss.pgh.pa.us>:
>
> What PG version is this?
>
>  If it's 8.2 or later then increasing the stats target for _comment.path
>  to 100 or more would likely help.
>

I'm using PG 8.2.4.
We are using 100 as default_statistics_target by default and all our
column are using this value:
# SELECT attname,attstattarget FROM pg_attribute WHERE attrelid=16743
AND attname='path' ;
 attname | attstattarget
---------+---------------
 path    |            -1

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.
The ANALYZE were longer to complete, but it did not change the planner
behavior (sometimes right, sometimes wrong).

I did not try setting up the target stats directly using an ALTER
TABLE because it implies some LOCK on our replication cluster. Do you
think the planner will act differently by using an ALTER TABLE rather
then just the "SET default_statistics_target" command ?

If so, I will try it =)

Thanks.

--
Laurent Raufaste
<http://www.glop.org/>

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Kynn Jones"
Дата:
Сообщение: Re: Q on views and performance
Следующее
От: Tom Lane
Дата:
Сообщение: Re: LISTEN / NOTIFY performance in 8.3