什么时候应该使用全文索引? [英] When should you use full-text indexing?
问题描述
我们有大量的查询可以为客户,客户等搜索。您可以通过名字,电子邮件等进行搜索。我们使用以下方式使用LIKE语句:
We have a whole bunch of queries that "search" for clients, customers, etc. You can search by first name, email, etc. We're using LIKE statements in the following manner:
SELECT *
FROM customer
WHERE fname LIKE '%someName%'
全文索引有助于场景吗?我们使用的是SQL Server 2005.
Does full-text indexing help in the scenario? We're using SQL Server 2005.
推荐答案
它将取决于您的DBMS。我相信大多数系统不会利用全文索引,除非您使用全文功能。 (例如,在mySQL或FREETEXT中匹配/反对 / CONTAINS in MS SQL)
It will depend upon your DBMS. I believe that most systems will not take advantage of the full-text index unless you use the full-text functions. (e.g. MATCH/AGAINST in mySQL or FREETEXT/CONTAINS in MS SQL)
下面是关于何时,为什么以及如何在SQL Server中使用全文索引的一篇很好的文章:了解SQL Server全文索引
Here is a good article on when, why, and how to use full-text indexing in SQL Server: Understanding SQL Server Full-Text Indexing
这篇关于什么时候应该使用全文索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!