MySQL Forums
Forum List  »  Performance

Re: Index usage for ORDER BY / LIMIT?
Posted by: KimSeong Loh
Date: June 14, 2005 07:26PM

This looks fine, it is reading the index and not the table.

With the limit 30, it will stop after it got 30 rows.
However if you use limit 1000,30, then it will need to read 1030 rows and return the last 30 rows ignoring the first 1000 rows, reason being that it does not know where is the 1001 rows, so have to count from the beginning.

Options: ReplyQuote


Subject
Views
Written By
Posted
2169
June 14, 2005 11:34AM
Re: Index usage for ORDER BY / LIMIT?
1546
June 14, 2005 07:26PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.