Re: PostgreSQL OR performance

Поиск
Список
Период
Сортировка
От Віталій Тимчишин
Тема Re: PostgreSQL OR performance
Дата
Msg-id 331e40660811060833l49bf837em41ca88d4b2061ea1@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PostgreSQL OR performance  ("Helio Campos Mello de Andrade" <helio.campos@gmail.com>)
Ответы Re: PostgreSQL OR performance  (Richard Huxton <dev@archonet.com>)
Re: PostgreSQL OR performance  ("Helio Campos Mello de Andrade" <helio.campos@gmail.com>)
Список pgsql-performance


2008/11/6 Helio Campos Mello de Andrade <helio.campos@gmail.com>
For what i see in four OR-plan.txt tou are doing too much "sequencial scan" . Create some indexes for those tables using the fields that you use an it may help you.

OBS: If you already have lots of indexes in your tables it may be a good time for you re-think your strategy because it´s ot working.
Tips:
  1 - create indexes for the tables with the fields that you will use in the query if it is your most important query. If you have others querys that are used please post those here and we can help you to desing a better plan.

As you can see from other plans, it do have all the indexes to perform it's work fast (when given part by part). It simply do not wish to use them. My question: Is this a configuration problem or postgresql optimizer simply can't do such a query rewrite?
 
Actually I did rewrite the query to work properly as you can see from union-plan.txt. My question is if postgresql can do this automatically because such a rewrite is not always easy/possible (esp. for generated queries)?

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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Occasional Slow Commit
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: PostgreSQL OR performance