Re: integer ceiling in LIMIT and OFFSET

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Scott Marlowe <scott(dot)marlowe(at)ihs(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: integer ceiling in LIMIT and OFFSET
Date: 2003-10-22 17:25:23
Message-ID: 1066843522.3284.27.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2003-10-22 at 12:08, scott.marlowe wrote:
> On Wed, 22 Oct 2003, Tom Lane wrote:
>
> > Rod Taylor <rbt(at)rbt(dot)ca> writes:
> > > That said, perhaps the TODO for changing LIMIT / OFFSET to be expression
> > > based should also mention bumping them to int8.
> >
> > Can't get excited about it ... this would slow down the normal use of
> > the facility for what seems a completely hypothetical need.
>
> While I'm pretty sure
>
> select * from sometable limit 2147483648
>
> isn't gonna be common, maybe someone would be likely to do something like:
>
> select * from sometable limit 10 offset 2147483648

> I wouldn't do it, but who knows what shadows lurk in men's minds?

The overhead in simply getting to that offset is going to be significant
and I would place my bets against anyone attempting that.

A cursor pulling small chunks of a multi-billion tuple set is probably
much more common, so we should ensure those work.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-10-22 17:26:00 Re: 7.4 compatibility question
Previous Message Bruce Momjian 2003-10-22 17:14:59 Re: So, are we going to bump catversion for beta5, or not?