List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 4 2000 10:03pm
Subject:Re: SUBSTRING_INDEX and indices
View as plain text  
At 2:05 PM -0400 2000-07-04, Ilia Lobsanov wrote:
>I am having a problem whereby I must use a SUBSTRING_INDEX in a query, but
>it slows it down tremendously (>100%). The column that the substring_index
>is acted upon *is* indexed.

The column itself might be indexed, but as soon as you apply a function
to a column value, the index can no longer be indexed.  MySQL must retrieve
each value, apply the function to it, and then determine whether the
resulting value satisfies the condition you're testing.

>Does MySQL just not support using the column index in conjuction with
>Is this a bug or just me?

It's not a bug.

Paul DuBois, paul@stripped
SUBSTRING_INDEX and indicesIlia Lobsanov4 Jul
  • Re: SUBSTRING_INDEX and indicesPaul DuBois4 Jul