Since you are putting a wild card at the front of the phrase, indexes
can't be used. You definitely want to change that to a full text index
if you want to search on words or phrases contained in a field.
I use a full text search on a database with 15k records and growing.
Each record contains a field with about 2-3 pages worth of text.
Searching is quick, even for complex searches. A few seconds at most on
a very slow machine (Macintosh 350Mhz G4).
On Tuesday, July 29, 2003, at 10:02 AM, Chris Edwards wrote:
> Hi
>
> I have a varchar field to search. There are 5k records.
>
> I'm using: WHERE name LIKE '%outer banks%'
>
> It seems to be very slow. I was reading about full text searches.
> Maybe I could do something like: WHERE MATCH ('name') AGAINST ('outer
> banks')
>
> I'm looking for a quick way to search.
>
> Does anyone have any suggestions?
>
> Thanks.
>
> --
> Chris Edwards
> Web Application Developer
> Outer Banks Internet, Inc.
> 252-441-6698
> chris.edwards@stripped
> http://www.OuterBanksInternet.com
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=1
>
>
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577