Re: BUG #6483: Rows being evaluated, although being outside the LIMIT / OFFSET boundaries

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marti Raudsepp <marti(at)juffo(dot)org>
Cc: kouber(at)saparev(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6483: Rows being evaluated, although being outside the LIMIT / OFFSET boundaries
Date: 2012-02-22 21:40:32
Message-ID: 25657.1329946832@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Marti Raudsepp <marti(at)juffo(dot)org> writes:
> According to this model, evaluating SELECT clause fields for *all*
> found rows is done in step 5, whereas LIMIT/OFFSET are only applied
> later at step 9. So we're already bending the rules here (in general
> we don't do such optimizations around volatile functions). The worst
> thing is that it's inconsistent -- the LIMIT gets applied when
> computing the SELECT list, but OFFSET doesn't.

On what grounds do you say that? LIMIT and OFFSET are practically the
same thing internally, and are certainly applied in the same way.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Marti Raudsepp 2012-02-22 22:05:22 Re: BUG #6483: Rows being evaluated, although being outside the LIMIT / OFFSET boundaries
Previous Message Marti Raudsepp 2012-02-22 21:13:03 Re: BUG #6483: Rows being evaluated, although being outside the LIMIT / OFFSET boundaries