From: | David Wheeler <david(at)wheeler(dot)net> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
Cc: | <sfpug(at)postgresql(dot)org> |
Subject: | Re: Offset |
Date: | 2003-08-28 17:36:31 |
Message-ID: | 2924DAC6-D97E-11D7-9D24-0003931A964A@wheeler.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | sfpug |
On Wednesday, August 27, 2003, at 09:52 PM, Stephan Szabo wrote:
> Might a subselect in from on the table containing the main objects
> with a
> limit on that do what you need?
>
> So instead of a query like:
> select * from foo left outer join bar on (foo.id=bar.fooid);
> you get something like:
> select * from
> (select * from foo limit <n> offset <m>) as foo left outer
> join bar on (foo.id=bar.fooid);
>
> Or am I misunderstanding? One problem with that is that I'm not sure
> at
> what version it'll start working, so it may not gain you anything since
> you need backward compatibility.
Oh yes, that's _exactly_ what I wanted. Thank you, Stephan, you're my
hero for the day! I think that with the addition of a feature like this
I'd be willing to push up the required version of PostgreSQL to 7.3.x.
What are the performance implications of this kind of subselect?
I wonder if MySQL 4.1 will be able to do this? If not, and I add this
to Bricolage, we won't really be able to port it to MySQL. Oh, well!
Thanks again, Stephan!
Regards,
David
--
David Wheeler AIM: dwTheory
david(at)kineticode(dot)com ICQ: 15726394
http://www.kineticode.com/ Yahoo!: dew7e
Jabber: Theory(at)jabber(dot)org
Kineticode. Setting knowledge in motion.[sm]
From | Date | Subject | |
---|---|---|---|
Next Message | David Wheeler | 2003-08-28 17:58:09 | Re: Offset |
Previous Message | Stephan Szabo | 2003-08-28 04:52:29 | Re: Offset |