Re: BUG #14107: Major query planner bug regarding subqueries and indices - Mailing list pgsql-bugs

From Mathias Kunter
Subject Re: BUG #14107: Major query planner bug regarding subqueries and indices
Date
Msg-id 629ecf23-b7b2-2d73-6792-150b111e83ab@gmail.com
Whole thread Raw
In response to Re: BUG #14107: Major query planner bug regarding subqueries and indices  (Yaroslav <ladayaroslav@yandex.ru>)
Responses Re: BUG #14107: Major query planner bug regarding subqueries and indices
List pgsql-bugs
> Seems like it. I've asked folks on IRC for help, and it was confirmed the
> bug exists since 8.2


So, as it currently stands, queries of the following synopsis are de
facto unusable with PostgreSQL, as these will always ignore any existing
indices and trigger a full table scan instead:


SELECT ... FROM a WHERE a.x = ? OR a.y IN (...);

SELECT ... FROM a JOIN b ON (...) WHERE a.x = ? OR b.y = ?;


The following SQL fiddle demonstrates the bug:
http://sqlfiddle.com/#!15/ab714/2

Does anybody care? Shouldn't something like this be fixed ASAP??

pgsql-bugs by date:

Previous
From: Nick Cleaton
Date:
Subject: Re: streaming replication master can fail to shut down
Next
From: Tom Lane
Date:
Subject: Re: BUG #14107: Major query planner bug regarding subqueries and indices