From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | David Rowley <david(dot)rowley(at)2ndquadrant(dot)com> |
Cc: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, konstantin knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Optimizer questions |
Date: | 2016-01-06 16:30:20 |
Message-ID: | CANP8+j+8bLSvO1PfJykHCc28Dj7=dWpemjGa0ABsRXGYqx7DVw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 6 January 2016 at 09:03, David Rowley <david(dot)rowley(at)2ndquadrant(dot)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/
<http://www.2ndquadrant.com/>
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Magnus Hagander | 2016-01-06 16:39:45 | Re: Commitfest app |
Previous Message | Stephen Frost | 2016-01-06 16:13:02 | Re: Additional role attributes && superuser review |