Re: Inconsistant query plan

От: Michael Fuhr
Тема: Re: Inconsistant query plan
Дата: ,
Msg-id: 20060124235857.GA92385@winnie.fuhr.org
(см: обсуждение, исходный текст)
Ответ на: Inconsistant query plan  ("Daniel Gish")
Ответы: Re: Inconsistant query plan  ("Daniel Gish")
Список: pgsql-performance

Скрыть дерево обсуждения

Inconsistant query plan  ("Daniel Gish", )
 Re: Inconsistant query plan  (Scott Marlowe, )
 Re: Inconsistant query plan  (Michael Fuhr, )
  Re: Inconsistant query plan  ("Daniel Gish", )
   Re: Inconsistant query plan  (Alessandro Baretta, )
 DB responce during DB dump  (Evgeny Gridasov, )
  Re: DB responce during DB dump  (Richard Huxton, )
   Re: DB responce during DB dump  (Tom Lane, )
    Re: DB responce during DB dump  (Evgeny Gridasov, )
   Re: DB responce during DB dump  (Evgeny Gridasov, )

On Tue, Jan 24, 2006 at 04:15:57PM -0700, Daniel Gish wrote:
> We are running Postgresql 8.1, and getting dramatically inconsistant results
> after running VACUUM ANALYZE.  Sometimes after analyzing the database, the
> query planner chooses a very efficient plan (15 rows, 4.744 ms), and
> sometimes a terrible one (24 rows, 3536.995 ms).  Here's the abbreviated
> query:
>
> SELECT * FROM t1 INNER JOIN (t2 INNER JOIN (t3 INNER JOIN t4 ON t3.gid =
> t4.gid) ON t3.gid = t2.gid) ON t2.eid = t1.eid WHERE ...

How abbreviated is that example?  Are you actually joining more
tables than that?  In another recent thread varying plans were
attributed to exceeding geqo_threshold:

http://archives.postgresql.org/pgsql-performance/2006-01/msg00132.php

Does your situation look similar?

--
Michael Fuhr


В списке pgsql-performance по дате сообщения:

От: "Daniel Gish"
Дата:
Сообщение: Re: Inconsistant query plan
От: Alessandro Baretta
Дата:
Сообщение: Re: Inconsistant query plan