MySQL Forums
Forum List  »  Optimizer & Parser

Re: SELECT on multiple column index
Posted by: James Day
Date: December 09, 2004 07:38PM

I'm not entirely clear what you're trying to do here but consider:

where c1 >= savedc1 and c2 >= savedc2 order by c1, c2 limit 1

Replace savedc1 and savedc2 with the preceding values. I expect this to be fast if you have a single index containing columns c1 and c2 in c1, c2 order.

Options: ReplyQuote


Subject
Views
Written By
Posted
9400
December 05, 2004 07:18AM
3289
December 09, 2004 09:08AM
3345
December 09, 2004 11:23AM
Re: SELECT on multiple column index
2976
December 09, 2004 07:38PM
3183
December 10, 2004 07:51AM
4240
December 10, 2004 08:42AM
2916
December 10, 2004 10:23AM
3324
December 10, 2004 11:02AM


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.