The basic point of this patch is to apply the generate-and-compare-Paths
paradigm to the planning steps after query_planner(), which only covers
> The present patch addresses this problem by inventing Path nodes to
> represent every post-scan/join step

I'm really glad to see that. Separating path nodes for later steps opens a new ways to optimize queries. For first glance, consider
select * from a left outer join b on a.i = b.i limit 1;
Limit node could be pushed down to scan over 'a' table if b.i is unique.

I tried to look into patch and I had a question (one for now): why LimitPath doesn't contain actual limit/offset value? I saw a lot of subqueries with LIMIT 1 which could be transformed into EXISTS subquery.

> So I'd really like to get this into 9.6.
Me too. I applied the patch and can confirm that 'make test' doesn't fail on FreeBSD 10.2. Now I will try to run kind of TPC-H with and without patch.

Teodor Sigaev                                   E-mail:

Sent via pgsql-hackers mailing list (
To make changes to your subscription:

Reply via email to