2012年3月27日星期二

Full Text Search vs LIKE Search

Are there any big differences between the two search techniques? It seems like they are both very similar.
SELECT * FROM TABLE1 WHERE TEXTFIELD1 LIKE '%DATABASES%'
SELECT * FROM TABLE1 WHERE CONTAINS (TEXTFIELD1 ,' "DATABASES" ')The like query will miss all indexes, but the fulltext query will use some sort of search-page-like index that the FullText engine has created.

Also, the FullText index has to be manually (or via a job) updated to collect all of the new additions. The like query will simply pick them up.|||I didn't try full text with mssql but yes... they are very diferent.
Like may seems to be fast some times, depending on the database, amount of records, etc, etc..
but compare full text index has the purpose to make very fast searchs. That's why the index it's so big.
Read about indexes of full text, and you will see that the size it's huge. Like has nothing to do in comparison to full text.

没有评论:

发表评论