如何在不使用 like '%%' 表达式的情况下改进 sql 中的文本搜索,并使搜索更快
最佳答案
使用 SQL Server 的 Full-Text Search特点:
In contrast to full-text search, the LIKE Transact-SQL predicate works on character patterns only. Also, you cannot use the LIKE predicate to query formatted binary data. Furthermore, a LIKE query against a large amount of unstructured text data is much slower than an equivalent full-text query against the same data. A LIKE query against millions of rows of text data can take minutes to return; whereas a full-text query can take only seconds or less against the same data, depending on the number of rows that are returned.
另请参阅:How to enable Full-text Indexing in SQL Server 2005 Express?
关于sql - 改进 sql 中的文本搜索,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8960077/