Re: How to uses self query plan

Поиск
Список
Период
Сортировка
От olivier boissard
Тема Re: How to uses self query plan
Дата
Msg-id 4768CEEF.9060506@cerene.fr
обсуждение исходный текст
Ответ на Re: How to uses self query plan  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Ответы Re: How to uses self query plan  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-admin
Scott Marlowe a écrit :
> On Dec 18, 2007 4:21 PM, olivier.boissard@cerene.fr
> <olivier.boissard@cerene.fr> wrote:
>
>> Hello,
>>
>> My purpose is to uses different query plan depending on queries
>> I got the following problem : some queries are taking too much time and
>> postgresql does not take the most relevant index in account.
>> I search on internet and found that no HINT function was available in
>> postgresl.
>> I tried to change indexes parameters in postgresql.conf but eache time I
>> set a param to OFF (example nested_loop ,seqscan, ...) , some queries
>> freeze database .
>>
>> How can we force postgresql to use a plan ?
>>
>
> That's not how we do things in postgresql land (usually).
>
> You should figure out WHY your queries are picking the wrong plan, and
> then see if you can get them to pick the right ones.  If it's a query
> planner bug, you report it here, or the perform or general lists, and
> it gets fixed.  Generic hints aren't likely to happen any time soon,
> although I do believe 8.3 is introducing function costing of some
> kind, which seems like a useful idea.
>
> But, back to fixing your slow queries.
>
> 1: Increase statistics targets on the guilty columns and reanalyze.
> 2: Run explain analyze select.... and post the output here.
> 3: ???
> 4: profit?
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: You can help support the PostgreSQL project by donating at
>
>                 http://www.postgresql.org/about/donate
>
>
Thanks for reply

I will extract some queries.
I want to precise that I use postgresql 8.1.0 .

Olivier



Вложения

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: How to uses self query plan
Следующее
От: "Scott Marlowe"
Дата:
Сообщение: Re: How to uses self query plan