搜尋 - 一或多個編目資料庫可能含有分散的索引 (SharePoint Server)Search - One or more crawl databases may have fragmented indices (SharePoint Server)

摘要: 了解如何為 SharePoint Server 2016 和 SharePoint 2013 解決 SharePoint Health Analyzer 規則「搜尋 - 一或多個編目資料庫可能含有分散的索引」。Summary: Learn how to resolve the SharePoint Health Analyzer rule "Search - One or more crawl databases may have fragmented indices" for SharePoint Server 2016 and SharePoint 2013.

規則名稱: 搜尋 - 一或多個編目資料庫可能含有分散的索引。Rule Name: Search - One or more crawl databases may have fragmented indices.

摘要: 本文說明 Search Service 應用程式編目資料庫磁碟重組的 SharePoint Health Analyzer 規則。編目資料索引的分散情形發生在與一般磁碟分割不同的層級。在正常編目作業期間建立、更新或刪除資料時,即會在每個編目資料庫中發生分散情形。執行狀況規則時,系統會連續使用存放區、排除未使用的存放區,並壓縮資料庫。Summary: This article describes the SharePoint Health Analyzer rule for Search service application crawl database defragmentation. The fragmentation of crawl data indexes occurs on a different level than regular disk fragmentation. It occurs in each crawl database as data is created, updated, or deleted during normal crawl activity. When you run the health rule, the system makes used storage contiguous, eliminates unused storage, and compacts the database.

建議您在下列情況下執行編目資料庫規則:We recommend that you run the crawl database rule under the following circumstances:

  • 在 SQL Server Enterprise 中,執行編目資料庫規則會自動啟用「頁面壓縮」功能,以最佳化 I/O 與磁碟存放區使用情況。In SQL Server Enterprise, running the crawl database rule automatically enables the Page Compression feature to optimize I/O and disk storage usage.

  • 編目資料庫的分散情形導致嚴重的效能降低時。此情況應該很少發生,因為編目資料庫通常都會有某些程度的分散。If significant performance degradation is determined to be caused by crawl database fragmentation. This should be a rare occurrence because crawl databases will usually have some level of fragmentation.

徵狀: 可能會出現下列一或多項徵狀:Symptoms: One or more of the following symptoms might appear:

  • 編目率會降低,因為將編目記錄寫入至編目資料庫需要更多時間。Crawl rate may decrease as more time is spent writing crawl history to the crawl database.

  • 編目資料庫磁碟重組狀況規則會執行並嘗試修正分散情形。請注意:當此規則正在修正分散情形時,會影響編目率。編目率會降低,因為將中繼資料寫入至屬性資料庫需要更多時間。The crawl database defragmentation health rule is run and attempts to correct the fragmentation. Note: when this rule is correcting the fragmentation, the crawl rate is affected. Crawl rate may decrease as more time is spent writing metadata to the property database.

原因: 當索引頁面中根據索引值的邏輯順序與資料檔案內的實體順序不符時,即存在分散情形。索引的所有分葉頁面均包含索引中下一頁及上一頁的指標。這會形成所有索引/資料頁面的雙向連結串列。在理想狀況下,資料檔案中各頁面的實體順序應該符合邏輯順序。當實體順序符合資料的邏輯順序時,整體磁碟輸送量會增加。Cause: Fragmentation exists when indexes have pages in which the logical ordering, based on the key value, does not match the physical ordering inside the data file. All leaf pages of an index contain pointers to the next and the previous pages in the index. This forms a doubly linked list of all index/data pages. Ideally, the physical order of the pages in the data file should match the logical ordering. Overall disk throughput is increased when the physical ordering matches the logical ordering of the data.

如需資料庫分散情形的詳細資訊,包括如何手動偵測及修復分散的索引,請參閱 SQL Server 文件。For more information about database fragmentation, including how to manually detect and repair fragmented indexes, see the SQL Server documentation.

解決方案:啟用及執行編目資料庫磁碟重組狀況規則Resolution: Enable and run the crawl database defragmentation health rule

  1. 確認執行此程序的使用者帳戶是伺服器陣列管理員群組的成員。Verify that the user account that is performing this procedure is a member of the Farm Administrators group.

  2. 在管理中心按一下 [監視]*In Central Administration, click *Monitoring.

  3. 在 [監視] 頁面上,按一下 [狀況分析器]**** 區段中的 [檢閱規則定義]*On the Monitoring page, in the *Health Analyzer section, click Review rule definitions.

  4. 在 [所有規則] 頁面上,按一下 [效能]**** 區段中的 [搜尋 - 一或多個編目資料庫可能含有分散的索引]*On the All Rules page, in the *Performance section, click Search - One or more crawl databases may have fragmented indices.

  5. 如果未啟用此規則,請在 [狀況分析規則定義]**** 對話方塊中,按一下功能區上的 [編輯項目]*。請務必選取 [啟用]* 核取方塊,然後按一下功能區上的 [儲存]*If the rule is not enabled, in the *Health Analyzer Rule Definitions dialog, click Edit Item on the ribbon. Ensure that the Enabled check box is selected, and then click Save on the ribbon.

  6. 在功能區上,按一下 [立即執行]*On the ribbon, click *Run Now.

  7. 按一下 [關閉]*Click *Close.

此規則會在所有 Search Service 應用程式的所有編目資料庫中反覆執行。執行時,此規則會先嘗試執行線上磁碟重組,然後再視需要切換為離線磁碟重組。在線上磁碟重組中,僅會重組 SQL Server 分葉頁面,而不會重組 SQL Server 的鎖定頁面。在離線磁碟重組中,會重組鎖定頁面及所有分葉頁面。在 SQL Server 企業版中,健康規則會自動啟用「頁面壓縮」功能來最佳化 I/O 和磁碟使用狀況。The rule iterates over all crawl databases in all Search service applications. When it runs, it attempts to perform an online defragmentation first, and then it switches to offline defragmentation where required. In online defragmentation, only the SQL Server leaf pages are defragmented, not the SQL Server locked pages. In offline defragmentation, the locked pages and all the leaf pages are defragmented. In SQL Server Enterprise, the health rule automatically enables the Page Compression feature to optimize I/O and disk usage.