Re: PostgreSQL OR performance

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: PostgreSQL OR performance
Дата
Msg-id 49131ED5.80307@archonet.com
обсуждение исходный текст
Ответ на Re: PostgreSQL OR performance  ("Віталій Тимчишин" <tivv00@gmail.com>)
Ответы Re: PostgreSQL OR performance
Список pgsql-performance
Віталій Тимчишин wrote:
> 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?

I must admit, I haven't managed to figure out what your query is trying
to do, but then that's a common problem with autogenerated queries.

The main question that needs answering is why the planner thinks you're
going to get 1.3 billion rows in the "or" query:

"Nested Loop  (cost=4588.13..960900482668.95 rows=1386158171 width=32)"

You don't show "explain analyse" for this query, so there's no way of
knowing how many rows get returned but presumably you're expecting
around 88000. What does "explain analyse" return?

--
  Richard Huxton
  Archonet Ltd

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

Предыдущее
От: "Віталій Тимчишин"
Дата:
Сообщение: Re: PostgreSQL OR performance
Следующее
От: "Helio Campos Mello de Andrade"
Дата:
Сообщение: Re: PostgreSQL OR performance