Anyone out there knows the frustration of slow SQL queries when using the LIKE statement in a SQL function. It has to scan the entire text of a column, using a pattern match to see if there's anything in there that's similar to what you gave it. Well, there is a better way - full-text searching in MySQL, and DevArticles.com has a new article about it to help you get started.
The full-text searching makes use of indexes and special search statements to use the indexes, and make search large amounts of text a snap. This article starts off explaining to you what the full-text searching is good for and what you'll need to get it working on your system. They then step right into it all and show you how to set up the tables and the indexes to make your searching work.
One of the coolest things about this searching style is that you can use it to return a "relevance" field that you can use to sort on with search results, for example. No need to try to write something that figures out how close of a match it is - it's already there for you! I think most people out there could benefit from using these MySQL full-text searches on their site, especially those with large amounts of content (like us).




