  | | | Using index returns an empty esult set | Using index returns an empty esult set 2006-07-02 - By Eitan Gur
Back Hi
I tried to create an index on one of my tables.
After creating this index, the queries return an empty set, instead of the expected result.
I have a table user looks like this:
id - int(11)
username - varchar(250)
address - varchar(250)
more columns...
After creating an index:
CREATE INDEX my_index on user (username(10));
I tried to run:
SELECT * FROM user WHERE username like 'homer';
I get an empty set, however when I run the same query without the index - I get results.
What am I doing wrong?
Thanks.
|
|
 |