Re: "WHERE 1 = 2 OR ..." makes planner choose a very inefficient plan

Поиск
Список
Период
Сортировка
Искать
От
Richard Huxton
Тема
Re: "WHERE 1 = 2 OR ..." makes planner choose a very inefficient plan
Дата
Msg-id
51700688.4050505@archonet.com
Ответ на
Список
Дерево обсуждения
"WHERE 1 = 2 OR ..." makes planner choose a very inefficient plan dmitry potapov <potapov.dmitry@gmail.com>
Re: "WHERE 1 = 2 OR ..." makes planner choose a very inefficient plan Tom Lane <tgl@sss.pgh.pa.us>
Re: "WHERE 1 = 2 OR ..." makes planner choose a very inefficient plan Simon Riggs <simon@2ndQuadrant.com>
Re: "WHERE 1 = 2 OR ..." makes planner choose a very inefficient plan Claudio Freire <klaussfreire@gmail.com>
Re: "WHERE 1 = 2 OR ..." makes planner choose a very inefficient plan Richard Huxton <dev@archonet.com>
On 18/04/13 15:20, dmitry potapov wrote:
> Hello,
>
> I recently stumbled upon on what could be a planner bug or a corner
> case. If " OR ..." is added to WHERE clause of SELECT
> query, then the planner chooses a very inefficient plan. Consider a query:

> If I comment out "1=2 OR", then the plan changes dramatically:

What happens if you substitute:
1. 1=3   OR
2. false OR

-- 
   Richard Huxton
   Archonet Ltd

В списке pgsql-performance по дате отправления
От: dmitry potapov
Дата:
От: Tom Lane
Дата:
FAQ