小编Tho*_*mas的帖子

SQL Server 性能突然下降

我的 SQL Server 2008 R2 实例有问题。上周的表现突然崩溃了。所有插入都非常非常缓慢。它需要比以前长4-5倍。在硬件上我们没有发现任何缺陷。一个月前我们遇到了同样的问题,但一周后问题消失得很快。

我不是这些方面的专家,但我注意到实例上所有数据库的性能都很差。CPU 和磁盘未达到极限,因此应该不是硬件性能问题。

我将使用此查询查看缓存页数:

select
       count(*)as cached_pages_count,
       obj.name as objectname,
       ind.name as indexname,
       obj.index_id as indexid
from sys.dm_os_buffer_descriptors as bd
    inner join
    (
        select       object_id as objectid,
                           object_name(object_id) as name,
                           index_id,allocation_unit_id
        from sys.allocation_units as au
            inner join sys.partitions as p
                on au.container_id = p.hobt_id
                    and (au.type = 1 or au.type = 3)
        union all
        select       object_id as objectid,
                           object_name(object_id) as name,
                           index_id,allocation_unit_id
        from sys.allocation_units as au
            inner join sys.partitions as p
                on au.container_id = p.partition_id …
Run Code Online (Sandbox Code Playgroud)

performance insert sql-server-2008-r2 cache

6
推荐指数
1
解决办法
3328
查看次数

标签 统计

cache ×1

insert ×1

performance ×1

sql-server-2008-r2 ×1