kevin vicky wrote:
Hi,

I am trying to use locate() function to get position of a substring in a
text field which on average has 2000 characters and the search substring is
30 -50 characters long. The table has around 2 million records and looking
for a efficient way to do the search. I tried fulltext index but dint see
any difference between using it or not. The text field is random characters
with space or sometimes no space, does this make the fulltext index not much
use? I also wonder about character set and collation, the text field will
contain only english alphabets and no special characters so is there a
special character set to use rather than the default?

What is the problem you are trying to solve?

What problem do you have when you use locate()?

Are you running locate on all 2 million records?

> Also since the search string will be between 30-50 characters is there
> any parameters to make the index effective?

I believe locate operates on the text field argument. So it doesn't use an index.

It sounds like you are confused (or one of us is confused :) so why don't you just back up and tell us what you are trying to accomplish.


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

Reply via email to