MySQL Forums
Forum List  »  Optimizer & Parser

Re: Double Index Performance
Posted by: Sebastien Caisse
Date: February 01, 2006 01:05PM

http://dev.mysql.com/doc/refman/5.0/en/mysql-indexes.html

To find the MIN() or MAX() value for a specific indexed column key_col. This is optimized by a preprocessor that checks whether you are using WHERE key_part_N = constant on all key parts that occur before key_col in the index. In this case, MySQL does a single key lookup for each MIN() or MAX() expression and replaces it with a constant. If all expressions are replaced with constants, the query returns at once.

In effect, I was sooo wrong :). Well, live, learn and get better!

Options: ReplyQuote


Subject
Views
Written By
Posted
7848
January 12, 2006 02:21PM
3028
January 13, 2006 05:18PM
2625
January 16, 2006 06:24AM
2687
January 16, 2006 08:46AM
2338
January 17, 2006 06:45AM
Re: Double Index Performance
2536
February 01, 2006 01:05PM


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.