2016-07-13 110 views

回答

0

檢索用戶掃描full text search指數與sys.dm_db_index_usage_stats至今:

SELECT FTSC.name AS CatalogName, 
     T.name AS TableName, 
     C.name AS ColumnName, 
     FTSIU.user_scans, 
     FTSIU.last_user_scan 
FROM sys.fulltext_catalogs AS FTSC 
JOIN sys.fulltext_indexes AS FTSI ON FTSC.fulltext_catalog_id = FTSI.fulltext_catalog_id 
JOIN sys.dm_db_index_usage_stats AS FTSIU ON FTSI.object_id = FTSIU.object_id AND FTSI.unique_index_id = FTSIU.index_id 
JOIN sys.tables AS T ON FTSI.object_id = T.object_id 
JOIN sys.columns AS C ON FTSI.object_id = C.object_id 
    AND FTSI.unique_index_id = C.column_id 
WHERE FTSIU.database_id = DB_ID()