FIX: ???? ???? ???? ?? SQL Server 2008 R2 ?? ?? SQL Server ??? 2012 ??? ??????? CPU ????? ?? ????? ?? ??????? QUERY_EXEC_STATS

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

?? ??? ??????

???? Microsoft ?????? Microsoft SQL Server 2008 R2 ?????? service Pack 1 (SP1) ?? ????? Microsoft SQL Server ??? 2012 ?? ??? ??????? ??????? ???????. ??? ???????? ?????????, ?? ????? ???? ????? ??? ???? ????????? ???????? ?????? ???? ??????? ?????? ???? ?? ????? ??????? SQL Server 2008 R2 ?????? service Pack 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 ????? ????????? ??? ?????? ??????? ????? ?? ?????? ??????.
  • ????? ? QUERY_EXEC_STATS ??????? ?????.
    ??? ???? ??????? ??? ????? ?????? ?????????? ???????? ???? ????? ????? QUERY_EXEC_STATS ?????? ??????? ?????.
    ?????? ????? ?? ????????? ??? ????? ?????? QUERY_EXEC_STATS ???????? ???? ??? "???? ?? ?????????".

?? ??? ?????????? ?? ???? ??? ??????.

?????

??? ??????? ??? ???? SQL Server 2008 R2 ?? ???? SQL Server ??? 2012 ????? ??? ??????? ??????? ??? ????????? ???????? ????? ?? ????? ??????? ?????? ???. ???? ???? ?????? ????.

????

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

SQL Server 2012

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

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

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

??????? ????

??????? ??????? QUERY_EXEC_STATS ? ??? ??????? ???? ???? ??????? ??? ????? ?????? ?????? ?? ?? ???????? ???????? ???????? ??? ?? ????? ??????:

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 ??????? ?? ??? "????? ???".

???????

???? ???????: 2662301 - ????? ??? ??????: 20/????? ??????/1433 - ??????: 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 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????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