From: Johan De Meersman Date: December 13 2012 9:26am Subject: Re: using LIMIT without ORDER BY List-Archive: http://lists.mysql.com/mysql/228808 Message-Id: <24629914.1349.1355390788968.JavaMail.root@tuxera.be> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1348_804040.1355390788967" ------=_Part_1348_804040.1355390788967 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit ----- Original Message ----- > From: "Akshay Suryavanshi" > I was referring to a condition when there is no index on the tables, > not even primary keys. If you have a lot of data in there, may I suggest you (temporarily) add a unique index and benchmark both methods? As I said, limit n,m is the last operation that gets executed, so it requires rows 0-n to be fetched, too. On deep pages that can be quite a lot of data needlessly fetched. You might find that the expense of maintaining that index may be well worth the speedup when fetching pages. > Your explanation makes complete sense about the optimizer and the > pagination queries. > Thanks, You're welcome. -- Unhappiness is discouraged and will be corrected with kitten pictures. ------=_Part_1348_804040.1355390788967--