Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When does full text index update in sql server?

I'm using a full-text search in one of my stored procedures. Prior to that (typical example would be several minutes) I'm inserting items into a table that has full-text index and some 3.5 million rows in the table. The thing is that the item does not exist(or the search query cannot find it) when I try to find it in the upper mentioned stored procedure. So I'm guessing that the index is still not updated at that point.

The question is...Could this even be the case or my problem is somewhere else?

If yes... When does the full-text index update? Does the time to process the index depend on the amount of data that it has? How long would it typically need for about 4 million records?

I'm using SQL Server 2008.

like image 243
TheBoyan Avatar asked Nov 05 '22 12:11

TheBoyan


1 Answers

So far I found out that full text indexes are "crawled" and that this can actually be the case that the index is not yet processed in my situation. We can for instance check this in sys.fulltext_indexes, as in:

SELECT OBJECT_NAME(object_id), is_enabled, has_crawl_completed, crawl_type, crawl_start_date, crawl_end_date
FROM sys.fulltext_indexes;

*See the CHANGE_TRACKING option for the CREATE FULLTEXT INDEX command.

like image 111
TheBoyan Avatar answered Nov 10 '22 18:11

TheBoyan