View Single Post

   
  #6 (permalink)  
Old 02-28-2008, 10:58 AM
subtenante
 
Posts: n/a
Default Re: Indexes And Sorting

On Tue, 05 Jun 2007 07:06:53 -0700, nk <nkoelling@gmail.com> wrote:

>Using the (datelast, status) index would probably work, but
>unfortunately I also have an index on ('status','somethingelse') in
>the table, which I need for another query. Since this index's
>cardinality is lower than the one of (datelast, status), MySQL chooses
>the wrong index and I still have the same problem.
>
>Any idea how I can force MySQL to use a certain index?


SELECT blabla FROM table USE INDEX myindex WHERE ...
or if it's really not willing to use it :
SELECT blabla FROM table FORCE INDEX myindex WHERE ...
Reply With Quote