Yes, large offsets could be a problem, we know this problem and we
solved it with our customized JDBC driver, forbiding too large
OFFSETs. However, a JDBC driver can not make OFFSETs faster.

And, if OFFSETs can be pushed down, the index can be built into a skip
list, which is fast even with lists of millions of elements.

On Sat, Mar 13, 2010 at 11:21 PM, MARK CALLAGHAN <[email protected]> wrote:
> On Sat, Mar 13, 2010 at 12:59 AM, Yuan Wang <[email protected]> wrote:
>> I think Drizzle should consider the ability to push down OFFSET to the
>> storage engine. LIMIT/OFFSET is very common in most Web applications.
>> Where there are lists, there are LIMIT/OFFSETs. For example, each user
>> in Blog has a list of his articles. For this list could be long, we
>> display it in pages, using the following SQL:
>
> This is a nice description of the problem and the feature that you
> need. But I have been burned so many times in production by queries
> with large offsets that I also want a feature to allow me to either
> ban queries with an offset or set a limit on the max offset that can
> be used. Of course, I can do that whether or not the optimization you
> have requested is supported.
>
> Note that I don't write SQL, I just debug it and make it less slow and
> this was written from experience --
> http://www.facebook.com/note.php?note_id=206034210932
>
> --
> Mark Callaghan
> [email protected]
>

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to