2013-03-17 69 views
0

最近我們遇到了一個奇怪的現象,我們在FTS結構的普通查詢:受影響的行數FTS查詢

select top 50 from TABLE where contains (COLUMN, 'string*') 

雖然查詢與top 50短語我們在仍然看到寫rowcount列,在探查器高數量的受影響的行。

當我們在yhe mgmt studio中運行查詢時,只返回相關的行。

這是全測試搜索的正常行爲嗎?

回答

0

也許你在同一過程中有其他操作?

RowCounts也會包含來自其他操作的受影響計數。例如,以下內容將在SQL:BatchCompleted事件中返回13。如果您捕捉SQL:StmtCompleted事件,以及你在這個RowCounts 13和之前的離散數:

declare @t table (i int) 
insert into @t 
     select 1 union all 
     select 2 union all 
     select 3; 

select top 5 * 
from dbo.YourTable; 

select top 5 * 
from dbo.YourOtherTable; 
+0

不,它只是一個簡單的選擇與含有語法。 – TheRunningDBA 2013-03-18 09:02:21

+0

感謝您的幫助,我剛剛意識到查詢在具有2個計算列的視圖上運行。 – TheRunningDBA 2013-03-18 09:38:20