Re: PATCH: use foreign keys to improve join estimates v1
От | Simon Riggs |
---|---|
Тема | Re: PATCH: use foreign keys to improve join estimates v1 |
Дата | |
Msg-id | CANP8+j+aXw2_RbQKL1va5YvH=12rE=XT=kqFOwiCnouJjh4OnQ@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: PATCH: use foreign keys to improve join estimates v1 (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: PATCH: use foreign keys to improve join estimates v1
|
Список | pgsql-hackers |
On 3 April 2016 at 22:44, Simon Riggs <simon@2ndquadrant.com> wrote:
--
Detailed comments in the planner part of the patch. The discussion around this patch isn't reflected enough in the patch.
I think we should record that the planner uses the constraint, even if the constraint is not yet valid, per DDL.
The rel cache code you're adding uses a flag called "rd_fkeyvalid" which indicates that the relcache is correctly filled. That is confusing, since it has nothing to do with the concept of constraint validity. We should rename that to rd_fkeycachefilled or similar.
ISTM that the FKey info added to the rel cache would be useful for many optimizations, hence why I think we should commit that separately, whether or not the specific optimization for the other half of the patch is accepted or later modified or revoked. Objections?
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления: