大网数据广告活动
数据库与应用安全

SchemaMgr Store entries degrade performance

· 52CE 我爱测

Provides a resolution for the problem where you may experience a performance degradation issue in SQL Server.

This article helps you resolve the problem where you may experience a performance degradation issue in SQL Server.

Original product version:   Microsoft SQL Server 2017 on Windows, SQL Server 2014, SQL Server 2016, SQL Server 2012
Original KB number:   4488254

Symptoms

You may experience performance degradation in SQL Server. When this issue occurs, you observe the following situation:

  • There are millions of SchemaMgr Store entries in the memory cache. You can see the information by running the following T-SQL script:

    SELECT entries_count
    FROM sys.dm_os_memory_cache_counters
    where name = 'SchemaMgr Store'
    
  • This issue can be accompanied by an increase in CMEMTHREAD waits and lock blocking, in which the locks wait_resource refers to a COMPILE lock type. You can see the information by running the following T-SQL script:

    select * from sys.dm_exec_requests where wait_type = 'CMEMTHREAD'
    select * from sys.dm_exec_requests where wait_resource like '%compile%'
    

Cause

This issue occurs when the number of cached HOBT statistics hits an internal soft limit. When the limit is reached, the system tries to aggressively remove entries, which cause contention on the memory object that's storing the data.

Resolution

To fix this issue, enable Trace Flag (TF) 8032.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 09/10/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。