Re: Optimizer questions

From: Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Optimizer questions
Date: 2016-01-06 11:16:20
Message-ID: 568CF784.8070609@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/06/2016 12:03 PM, David Rowley wrote:
> Konstantin, are you thinking of looking into this more, with plans to implement code to improve this?
>

I am not familiar with PostgreSQL optimizer, but I now looking inside its code and trying to find a way to fix this problem.
But if there is somebody is familar with optimizer and already knows solution, please let me know so that I do no spend time on this.

Actually I expect that most of the logic is already present in optimizer: there are several places where it is considered where and how to evaluate tlist.
For example, there are functions use_physical_tlist/disuse_physical_tlist which triggers whether the relation targetlist or only those Vars actually needed by the query. Not sure that that them are related to this particular case...

So most likely it will be enough to insert just one function call is the proper place, but it is necessary to find the function and the place;)

> --
> David Rowley http://www.2ndQuadrant.com/
> PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thom Brown 2016-01-06 11:37:41 Re: Optimization for updating foreign tables in Postgres FDW
Previous Message Pavel Stehule 2016-01-06 10:39:12 Re: Proposal: SET ROLE hook