From: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: postgres performance list <pgsql-performance@postgresql.org>
Subject: Re: Shortcutting too-large offsets?
Date: Fri, 30 Sep 2011 11:44:25 -0700
Message-ID: <4E860E09.7090107@agliodbs.com> (raw)
In-Reply-To: <6843.1317393410@sss.pgh.pa.us>
References: <4E850FC0.509@agliodbs.com>
<6843.1317393410@sss.pgh.pa.us>
Tom,
> In principle, yeah, we could make it do that, but it seems like a likely
> source of maintenance headaches. This example is not exactly compelling
> enough to make me want to do it. Large OFFSETs are always going to be
> problematic from a performance standpoint, and the fact that we could
> short-circuit this one corner case isn't really going to make them much
> more usable.
It's not that uncommon of a corner case though; it's one which happens
all the time in webapps which paginate. People just have to ask for a
page after the end. It's really a question of how simple the code to
make the optimization would be; if it would be a 5-line patch, then it's
worth it; if it would be a 110-line refactor, no.
Lemme see if I can figure it out ...
--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com
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 using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: josh@agliodbs.com, tgl@sss.pgh.pa.us
Subject: Re: Shortcutting too-large offsets?
In-Reply-To: <4E860E09.7090107@agliodbs.com>
* 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