What would be the most efficient way to do this search (mysql or text)?
Posted
by alex
on Stack Overflow
See other posts from Stack Overflow
or by alex
Published on 2010-03-08T13:18:54Z
Indexed on
2010/03/08
13:21 UTC
Read the original article
Hit count: 109
Suppose I have 500 rows of data, each with a paragraph of text (like this paragraph). That's it.I want to do a search that is not only based on words. (%LIKE%, not FULL_TEXT)
What would be faster?
- SELECT * FROM ...WHERE LIKE "%query%"; This would put load on the database server.
- Select all. Then, go through each one and do .find >= 0 This would put load on the web server.
This is a website, and people will be searching frequently.
© Stack Overflow or respective owner