MySQL Forums
Forum List  »  Optimizer & Parser

Re: min() vs limit optimization
Posted by: Paul Medynski
Date: July 03, 2006 05:22PM

I think you missed the part where I said that StuffId is the primary key of the table. That means it is indexed by a unique key, which means it is ordered, which means that the next StuffId to the "right" (ie greater than the current StuffId) will always be the one I want.

So the two queries should, in fact, return the same value over time. Unless MySQL is broken, which would be unfortunate.

Can anyone else familiar with the optimizer and the way MySQL reads its B-tree indices provide some feedback?

Thanks,
- Paul

Options: ReplyQuote


Subject
Views
Written By
Posted
5505
July 02, 2006 05:34PM
2209
July 02, 2006 08:26PM
Re: min() vs limit optimization
2151
July 03, 2006 05:22PM
2307
July 04, 2006 06:51AM


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.