Re: Optimizer questions - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Optimizer questions
Date
Msg-id CANP8+j+8bLSvO1PfJykHCc28Dj7=dWpemjGa0ABsRXGYqx7DVw@mail.gmail.com
Whole thread Raw
In response to Re: Optimizer questions  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-hackers
On 6 January 2016 at 09:03, David Rowley <david.rowley@2ndquadrant.com> wrote:
 
It seems worthwhile to investigate how we might go about improving this so that the evaluation of the target list happens after LIMIT, at least for the columns which are not required before LIMIT.

Currently, the FunctionScan executes until it decides to stop. Then later the LIMIT is applied.

To change this, you'd need to pass down the LIMIT value into the FunctionScan node, as is already done between Limit/Sort nodes.

On the FunctionScan,  you can set the max_calls value in the FuncCallContext, but currently that isn't enforced.

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Additional role attributes && superuser review
Next
From: Magnus Hagander
Date:
Subject: Re: Commitfest app