At 5:29 PM -0800 2000-02-07, Mike Machado wrote:
>Is there a reason when I use STRCMP() that the mysql does not use it as
>an indexed column? There is
>about 1.8 million rows in this table and it takes 0.03 seconds with the
>Username = 'blah', but like 6 minuets
>with STRCMP(UserName,'blah') = 0. Here is the status output and where it
>shows what indexes the queries use.
Because you can't compute STRCMP() without actually retrieving the
values, and don't know which values will satisfy your expression without
scanning them all. Indexes are useless when you use a column value
as an argument to a function.
Paul DuBois, paul@stripped