MySQL Forums
Forum List  »  Optimizer & Parser

Re: two column int index not used correctly
Posted by: Jørgen Løland
Date: June 15, 2011 11:30PM

Hi Ming,

Like I told Alexander, it's very difficult to resolve range queries with a WHERE clause like you two have...

column_a cmp constant1 AND column_b cmp constant2
(where cmp is any of <, >, <=, >=, between) an efficient way if many or even most rows in the table have different column_a values. You might want to look into that because I don't think it will scale to a great number of rows.

Hope this helps,
Jørgen Løland
Software Engineer, MySQL, Oracle

Edited 1 time(s). Last edit at 06/15/2011 11:30PM by Jorgen Loland.

Options: ReplyQuote

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.