Matt,

Thank you for the help and you are correct the index can't be utilized when using !=.  
I will try
your hack/work around.

Thanks again.
sql,query

>Hi Heath,
>
>MySQL cannot use the trans_team query because you're using !=, for which
>an index is never used (currently anyway). Do you think that trans_team
>is the best index that will find the least rows and produce the fastest
>result? If so, you can try using the following, which can be optimized,
>instead of !=
>
>... AND
>(transfer_logs.trans_team < 'team oscar' OR
>transfer_logs.trans_team > 'team oscar')
>
>I think that's the same as !=. :-) But MySQL will only use the index if
>it will find few enough rows (< ~30%) -- in other words, if more than
>~2/3 of the trans_team values ARE 'team oscar'.
>
>Hope that helps.
>
>
>Matt

__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to