Did you find an answer to this problem? I also need to force an index since MySQL fails miserably to choose the proper one.
I searched high and low and there seems to be absolutely no information how can this be done in cake, if all all. - barduck On Mar 31, 3:32 pm, max <[email protected]> wrote: > Hello > I want force use mysql multiple-field index. > Mysql don't use multiple-field index in my query. > How I can addUSE INDEXto the Model->find() method? > > After call Model->find() method > Cakephp executed this query > SELECT * FROM `table` where a=1 AND b>2 ORDER BY b > > How I can addUSE INDEXinto query? > It must be so: > SELECT * FROM `table`USE INDEX(two_field_multiple_index) where a=1 > AND b>2 ORDER BY b > > Thanks. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
