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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 "<false condition> 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


--
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance




[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux