MySQL Forums
Forum List  »  Optimizer & Parser

Re: min() vs limit optimization
Posted by: Apachez
Date: July 04, 2006 06:51AM

Even if the primary key is clustered (in sorted order) in innodb the query is not always starting at row 1 when the query is being processed.

There can for example already exist cached pages in the key_buffer (or whatever key_buffer is called when using innodb) which is first being examined, if the "where StuffId > X limit 1" query gets a hit in key_buffer the processing of the query will end due to "limit 1" optimizations which at least for me means that you cannot be 100% sure to get the correct answer each time.

Or is this documented somewhere in mysql's documentations that mysql will always bypass the key_buffer for new queries ?

Options: ReplyQuote


Subject
Views
Written By
Posted
5506
July 02, 2006 05:34PM
2209
July 02, 2006 08:26PM
2152
July 03, 2006 05:22PM
Re: min() vs limit optimization
2308
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.