开发者

FullText in a Indexed View - Incremental Population

开发者 https://www.devze.com 2023-02-04 23:26 出处:网络
I\'ve created a indexed view in Sql Server 2008. In order to use incremental population on tables, we need to create a timestamp column. But should I create this timestamp column on the tabl开发者_如何

I've created a indexed view in Sql Server 2008. In order to use incremental population on tables, we need to create a timestamp column. But should I create this timestamp column on the tabl开发者_如何学Goe wich is referenced by the view? If so, should the view return the timestamp column (maybe sql needs to query the view to get the timestamp column, and because of that i need to return it in my view).


You'll want the timestamp column created on the base table so that it is updated every time a row is modified. You should also return the timestamp column in the view as it will be used by the fulltext engine to identify which rows have changed since the last population.

From this TechNet article:

SQL Server uses the timestamp column to identify rows that have changed since the last population. The incremental population then updates the full-text index for rows added, deleted, or modified after the last population, or while the last population was in progress.
...

At the end of a population, the Full-Text Engine records a new timestamp value. This value is the largest timestamp value that SQL Gatherer has encountered. This value will be used when a subsequent incremental population starts.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号