pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Marti Raudsepp <marti@juffo.org>
Cc: kouber@saparev.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6483: Rows being evaluated, although being outside the LIMIT / OFFSET boundaries
Date: Wed, 22 Feb 2012 16:40:32 -0500
Message-ID: <25657.1329946832@sss.pgh.pa.us> (raw)
In-Reply-To: <CABRT9RA6BWuTV1PESSQ-x_5+3qUJMgz0NnVZyzbFyjwY1CQgmQ@mail.gmail.com>
References: <E1S0HJX-0004pP-9Y@wrigleys.postgresql.org>
	<CABRT9RA6BWuTV1PESSQ-x_5+3qUJMgz0NnVZyzbFyjwY1CQgmQ@mail.gmail.com>

Marti Raudsepp <marti@juffo.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



view thread (7+ messages)  latest in thread

Message-ID: <25657.1329946832@sss.pgh.pa.us>
Permalink:  ../25657.1329946832@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25657.1329946832@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, marti@juffo.org, kouber@saparev.com
  Subject: Re: BUG #6483: Rows being evaluated, although being outside the LIMIT / OFFSET boundaries
  In-Reply-To: <25657.1329946832@sss.pgh.pa.us>
  References: <E1S0HJX-0004pP-9Y@wrigleys.postgresql.org> <CABRT9RA6BWuTV1PESSQ-x_5+3qUJMgz0NnVZyzbFyjwY1CQgmQ@mail.gmail.com> <25657.1329946832@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox