Steven Roussey wrote:

>>Any way to hint a particular index for a query?
>>
> 
> From the manual (http://www.mysql.com/doc/J/O/JOIN.html)


Thanks. I missed that.  Unfortunately, as I was afraid, this is a very 
MySQL-specific way of doing it. But then, hints always are DB-specific, so 
that's not too different..

(I have to target my product on multiple databases, so I have to keep my 
queries simple so as to make it portable).

What helped, of course, was creating *realistic* a data set where the data 
matching "state = 1" was only 10% of the total rows - it now uses the 
"state" index, as expected.

So I think I'm ok, after all. Thanks for the pointers!
--
Shankar.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to