Re: WIP: Upper planner pathification - Mailing list pgsql-hackers

From Teodor Sigaev
Subject Re: WIP: Upper planner pathification
Date
Msg-id 56D58706.3010203@sigaev.ru
Whole thread Raw
In response to WIP: Upper planner pathification  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: WIP: Upper planner pathification  (Oleg Bartunov <obartunov@gmail.com>)
Re: WIP: Upper planner pathification  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> 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: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



pgsql-hackers by date:

Previous
From: Julien Rouhaud
Date:
Subject: Re: Publish autovacuum informations
Next
From: Michael Paquier
Date:
Subject: Re: Re: In-core regression tests for replication, cascading, archiving, PITR, etc.