Re: Wildly erratic query performance

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: Wildly erratic query performance
Дата
Msg-id dcc563d10810311409x125cd922hce13afee6956d3da@mail.gmail.com
обсуждение исходный текст
Ответ на Wildly erratic query performance  (Eric Schwarzenbach <subscriber@blackbrook.org>)
Ответы Re: Wildly erratic query performance
Список pgsql-general
On Fri, Oct 31, 2008 at 1:34 PM, Eric Schwarzenbach
<subscriber@blackbrook.org> wrote:
> I've got a particular query that is giving me ridiculously erratic query
> performance. I have the SQL in a pgadmin query window, and from one
> execution to another, with no changes, the time it takes varies from

SNIP

> This is postgreslq 8.3, on Windows XP. The query joins about 17 tables
> (without an explicit JOIN, just using the WHERE criteria) with a few

OK, whether you use join syntax or where clause syntax, postgresql can
attempt to use the GEQO method to determine a close fit for the query
plan.  You can change these settings:

#geqo = on
#geqo_threshold = 12
#geqo_effort = 5                        # range 1-10

To control the GEQO.  Just crank the threshold to 20 or something so
it doesn't kick in for now and see how long your queries take.  The
planning time will go up, because pgsql will do exhaustive logic to
determine the best plan, but it should consistently pick a good plan.

and look at these too:

#from_collapse_limit = 8
#join_collapse_limit = 8

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

Предыдущее
От: Eric Schwarzenbach
Дата:
Сообщение: GEQO randomness?
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: harddisk configuration