?????: ???? CPU ????? contention ?? ??? QUERY_EXEC_STATS spinlock ?? ????????? ?? ???? ??????????? SQL Server 2008 R2 ?? SQL Server 2012 ??? ???? ??

???? ?????? ???? ??????
???? ID: 2662301 - ?? ???????? ?? ?????? ??? ?? ?? ???? ???? ???? ??.
??? ?? ??????? ???? | ??? ?? ??????? ????

?? ????? ??

Microsoft ?????? ???? ?? Microsoft SQL Server 2008 R2 ?????? ??? 1 (SP1) ?? Microsoft SQL Server 2012 ??? ?? ????? ????? ??? ???? ??? ???????? ????? ???? ???, ??????? ??? ?????????? ?? ?? ???? ?? ?? ?? ????? SQL Server 2008 R2 ?????? ??? 1 (SP1) ?? Microsoft SQL Server 2012 ?? ??? ????? ??? ?? ??? ??????? ?????? ?? ?????? ???????

?????

?? ???????? ?? ????? ????:
  • ??? ?? ???? ??? ???????? ?? Microsoft SQL Server 2008 R2 ?? Microsoft SQL Server 2012 ?? ?? ?????? ??????? ?????
  • ????? ?? ???? ????? ???????? ????? ??? ?????? ????????? ??? ???:
    CREATE PROC p AS RETURN (
    query
    ); EXEC p;
    ??, ?? ????? ??? ????? ?? ?????? ?????:

    IF EXISTS(
    subquery
    );
  • CPU ????? ?????? ???? ??, ?? ??? ??????? runnable ?????? ??? ????
  • Contention ?? ??? QUERY_EXEC_STATS spinlock ???? ???
    ?????? ?? ???, ????? ?????, ???? collisions ?? ???? ??? ????? ?? ??? QUERY_EXEC_STATS spinlock ????? ???????
    ??? ???? ??????? ?? ???? ??? ???? ??????? ?? ??? QUERY_EXEC_STATS spinlock, "???? ???????" ??? ??????

?? ???????? ???, ???????? ???? ?? ???? ???

????

?? ?????? ??????? ?? SQL Server 2012 ????? ?? ?? ?????? ?????? ?? ???? ??????? ??????? ?? ???? ??? ??? ?????? ???????? destroys SQL Server 2008 R2 ???? ??? ?? ?? ???????? bottleneck ????? ???

????????

????? ?????? ???????

SQL ????? 2012

?? ?????? ?? ??? ????? ???? ????? ?????? 1 SQL Server 2012 ?? ??? ???? ???? ??? ??? ?? ????? ?????? ?????? ?? ???? ??? ???? ??????? ?? ??? Microsoft ???????? ??? ???? ????? ?? ??? ?????????? ???? ?????? ????? ????:
2679368 SQL Server 2012 ?? ??? ????? ?????? ?????? 1
??? Builds ????? ???? ???, ??????? ??? ?????????? ?? ?? ????? ???? ?? ?? ?? ????? SQL Server 2012 ?? ??? ????? ??? ?? ??? ??????? ???????? ?????? ???? ??? ?? ?????? ?? ???????? ????? ?????? ????? ?????? ???? ????? ?? Microsoft ??????? ???? ??? ???? ??????? ?? ???, Microsoft ???????? ??? ???? ????? ?? ??? ?????????? ???? ?????? ????? ????:
2692828 SQL Server 2012 ?????? ???? ??? ?? ?? ??? ?????? ???? ??? ?? ?? ?? SQL Server 2012
??? ?? SQL ????? 2012 ?? ??????? ???? ?? ??? SQL Server 2012 ???????? ???? ???? ??????

SQL Server 2008 R2 SP1 ?? ??? ????? ?????? ?????? 5

?? ?????? ?? ??? ????? ????? ?????? 5 ??? ???? ?????? ???? ??? ??? ?? ????? ?????? ?????? ?? SQL ????? 2008 R2 SP1 ?? ??? ??????? ???? ?? ???? ??? ???? ??????? ?? ??? Microsoft ???????? ??? ???? ????? ?? ??? ?????????? ???? ?????? ????? ????:
2659694 SQL Server 2008 R2 SP1 ?? ??? ????? ?????? ?????? 5
??? Builds ????? ???? ???, ??????? ??? ?????????? ?? ?? ????? ???? ?? ?? ?? ????? SQL ????? 2008 R2 SP1 ?? ??? ????? ??? ?? ??? ??????? ???????? ?????? ???? ?? ???? ???? ?????? ?? ???????? ????? ?????? ????? ?????? ????? ?? ????? ??? ???? ??????? ?? ???, Microsoft ???????? ??? ???? ????? ?? ??? ?????????? ???? ?????? ????? ????:
2567616 SQL Server 2008 R2 ?? ?????? ??? ?? SQL Server 2008 R2 SP1 ?? ?????? ???? ??? ?? ?? ??? ??

???? ???????

QUERY_EXEC_STATS spinlock ?? ??????? ???? ?? ???, ????? ?? ?????? ?????????????? ???? ?????? ??? ????? ??? ?? ??? ??????? ?? ??? ??? ???????? ????, ?? ???? ??? ??? ?????:

SET NOCOUNT ON
CREATE TABLE #spins([Spinlock Name] varchar(50),Collisions numeric,Spins numeric,[Spins/Collision] float,[Sleep Time (ms)] numeric,Backoffs numeric, InsertTime datetime DEFAULT GETDATE())
DECLARE @counter int = 1
WHILE @counter < 10
      BEGIN
            INSERT INTO #spins ([Spinlock Name], Collisions, Spins, [Spins/Collision], [Sleep Time (ms)], Backoffs) EXECUTE ('DBCC SQLPERF (''SPINLOCKSTATS'') WITH NO_INFOMSGS')
            WAITFOR DELAY '00:00:05'
            SET @counter +=1
      END
SELECT * FROM #spins WHERE [Spinlock Name] = 'QUERY_EXEC_STATS' ORDER BY InsertTime
DROP TABLE #spins

??????

Microsoft ?? ?????? ?? ?? ?? ?? "?? ?? ????" ???? ??? ???????? Microsoft ???????? ??? ?? ?????? ???

???

???? ID: 2662301 - ????? ???????: 12 ?????? 2012 - ??????: 1.0
???? ???? ???? ??:
  • Microsoft SQL Server 2008 R2 Datacenter
  • Microsoft SQL Server 2008 R2 Developer
  • Microsoft SQL Server 2008 R2 Enterprise
  • Microsoft SQL Server 2008 R2 Standard
  • Microsoft SQL Server 2012 Developer
  • Microsoft SQL Server 2012 Enterprise
  • Microsoft SQL Server 2012 Standard
??????: 
kbqfe kbfix kbexpertiseadvanced kbsurveynew kbmt KB2662301 KbMthi
???? ?????? ????????
??????????: ?? ???? ?? ???? ??????? ?? ????? ?? Microsoft ????-?????? ?????????? ?????? ?????? ???? ??? ??. Microsoft ???? ??? ????-???????? ?? ????-???????? ????? ?????? ?? ???? ???????? ???? ?? ???? ????? ????? ??? ?? ??? ?????? ?? ???? ???? ???? ??? ????? ??. ???????, ????-???????? ???? ????? ???? ???? ???? ???. ?????, ????????, ?????-???? ?? ??????? ?? ???????? ?? ???? ???, ???? ?? ??? ?????? ???? ???? ??? ????? ??? ?? ???? ??. Microsoft ??????? ??? ???? ?? ?????? ?? ??????????, ????????? ?? ??? ?????? ?? ???? ????? ?? ???? ???????? ?? ??? ???? ????? ?? ??? ????????? ???? ??. Microsoft ????-?????? ?????????? ?? ????? ?????? ?? ?? ??? ??.
?????????? ?? ??????? ????????? ??????? ??:2662301

??????????? ???

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com