Re: Allowing NOT IN to use ANTI joins

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Allowing NOT IN to use ANTI joins
Дата
Msg-id CAApHDvqE55qra8vfDvJ_0Gnw7152QM95YH1XD1enOE=T1bgFRQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Allowing NOT IN to use ANTI joins  (Jeevan Chalke <jeevan.chalke@enterprisedb.com>)
Список pgsql-hackers
On Wed, Jul 2, 2014 at 9:25 PM, Jeevan Chalke <jeevan.chalke@enterprisedb.com> wrote:


Testing more on SQL level.



I'm just looking into an issue I've found in the find_inner_rels() function, where it does not properly find the rel in the from list in certain cases, for example:

explain select * from a where id not in (select b.id from b left outer join c on b.id=c.id);
 
fails to use an ANTI JOIN, but if you remove the left join to c, it works perfectly.

Currently I'm just getting my head around how the jointree is structured and reading over deconstruct_jointree to see how it handles this. I may change the function to find_outer_rels and just look for outer joins in the function.

However, assigning it to author to think on above cosmetic issues.


Thanks for the review. I'll fix the issues you listed soon, but I'll likely delay posting the updated patch until I have the other fix in place.

Regards

David Rowley

Thanks

--
Jeevan B Chalke
Principal Software Engineer, Product Development
EnterpriseDB Corporation
The Enterprise PostgreSQL Company


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

Предыдущее
От: Andrew Gierth
Дата:
Сообщение: Aggregate function API versus grouping sets
Следующее
От: Dilip kumar
Дата:
Сообщение: Re: Selectivity estimation for inet operators