Re: Forcing the right queryplan

Поиск
Список
Период
Сортировка
От Henk van Lingen
Тема Re: Forcing the right queryplan
Дата
Msg-id 20100909150417.GD24520@uu.nl
обсуждение исходный текст
Ответ на Re: Forcing the right queryplan  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Forcing the right queryplan  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu, Sep 09, 2010 at 10:50:52AM -0400, Tom Lane wrote:
  > Henk van Lingen <H.G.K.vanLingen@uu.nl> writes:
  > >          ->  Bitmap Heap Scan on systemevents  (cost=61221.23..668806.93 rows=239805 width=158) (actual
time=9.131..1786.406rows=464 loops=1) 
  > >                Recheck Cond: (to_tsvector('english'::regconfig, message) @@ to_tsquery('131.211.112.9'::text))
  >
  > Well, there's your problem: the planner is off by a factor of about 500
  > on its estimate of the number of rows matching this query, and that's
  > what's causing it to pick the wrong plan.  What you need to look into
  > is getting that estimate to be more in sync with reality.  Probably
  > increasing the stats target for the message column would help.

  But how can I get sane estimates for syslog data? Some searchstrings will
  result in only a few hits, others in thousands of records or more.

  Regards,


--
Henk van Lingen, ICT-SC Netwerk & Telefonie,                  (o-      -+
Universiteit Utrecht, Jenalaan 18a, room 0.12                 /\        |
phone: +31-30-2538453                                         v_/_      |
http://henk.vanlingen.net/             http://www.tuxtown.net/netiquette/

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

Предыдущее
От: Chris Barnes
Дата:
Сообщение: Re: logging postgres to syslog on centos, truncates the postgres message.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Forcing the right queryplan