Re: Problems with FTS

Поиск
Список
Период
Сортировка
От Jesper Krogh
Тема Re: Problems with FTS
Дата
Msg-id 4ED71A9C.5030603@krogh.cc
обсуждение исходный текст
Ответ на Re: Problems with FTS  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-performance
On 2011-11-30 21:58, Robert Haas wrote:
> The row-count estimates look reasonably accurate, so there's some
> other problem here.  What do you have random_page_cost, seq_page_cost,
> and effective_cache_size set to?  You might try "SET
> random_page_cost=2" or even "SET random_page_cost=0.5; SET
> seq_page_cost=0.3" and see if those settings help
I may be seing ghosts here, since I've encountered
the same problem.  But the Query-planner does not
take toast into account, so a Sequential Scan + filter
only cost what it takes to scan the main table, but fts-fields
are typically large enough to be toasted so the cost should
be main+toast (amount of pages) + filtering cost.

I posted about it yesterday:

http://archives.postgresql.org/pgsql-hackers/2011-11/msg01754.php

If above problem is on <9.1 a patch to proper account of gin-estimates
have been added to 9.1 which also may benefit the planning:
http://www.postgresql.org/docs/9.1/static/release-9-1.html

     Improve GIN index scan cost estimation (Teodor Sigaev)

Jesper
--
Jesper

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

Предыдущее
От: Benjamin Johnson
Дата:
Сообщение: Re: Guidance Requested - Bulk Inserting + Queries
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: Guidance Requested - Bulk Inserting + Queries