--- michael cuthbertson <[EMAIL PROTECTED]> wrote: > This qry is used to refresh a scrolling display where any of the constants > are actually variables. > The subquery returns about 1000 rows. > Note that a LIMIT = 1 is only marginally faster than 32. > Also, as the offset increases, the exec. time increases about 50% as fast, > which I do not understand, > since this would merely seem to be an index into the result set that should > be low cost.
As an time and memory optimization, each row passing the WHERE criteria is inserted into a set of ordered rows of size no larger than OFFSET+LIMIT. So you can see that doing an insertion into a set of 855+1 ordered rows is little different than 855+32 rows in terms of speed. The explanation above does not cover the special cases where OFFSET and/or LIMIT values are negative, but you get the idea. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com