ãã£ãã«äœ¿çšãããªãSQL Serverããã©ãŒãã³ã¹ã®ãã©ãã«ã·ã¥ãŒãã£ã³ã°æ¹æ³ã®1ã€ã¯ãæåŸ å€ãšãã¥ãŒïŒæåŸ å€çµ±èšãšãåŒã°ããŸãïŒãšåŒã°ããŸãã æ¹æ³è«ã®åºæ¬çãªåæã¯ãSQL Serverãã©ã®ã¹ã¬ãããåŸ æ©ããããåžžã«ç£èŠããããšã§ãã ããã©ãŒãã³ã¹ã®åé¡ã®èããããåå ã®ãªã¹ããççž®ããããã«ãSQL Serverã«ãã®æ å ±ãèŠæ±ã§ããŸãã æåŸ ã¯SQL Serverãç£èŠãããã®ã§ãã ãã¥ãŒã¯ãã¹ã¬ãããã¢ã¯ã»ã¹ãåŸ æ©ããŠãããªãœãŒã¹ã§ãã éåžžãã·ã¹ãã ã¯èšå€§ãªæ°ã®æåŸ ãç²åŸãããããã¯ãã¹ãŠããŸããŸãªãªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãåŸ æ©ããããšãæå³ããŸãã ããšãã°ãPAGEIOLATCH_EXãåŸ ã€ããšã¯ãã¹ããªãŒã ããã£ã¹ã¯ãããããã¡ããŒã«ãžã®ããŒã¿ããŒãžã®èªã¿åããåŸ ã£ãŠããããšãæå³ããŸãã LCK_M_XãåŸ ã£ãŠãããšããããšã¯ãã¹ã¬ãããäœãã«æä»ããã¯ããããæ©äŒãåŸ ã£ãŠããããšãæå³ããŸãã
çŽ æŽããããã¥ãŒã¹ã¯ãSQL Server ãããã©ãŒãã³ã¹ã®åé¡ãäœã§ããããæ£ç¢ºã«ç¥ã£ãŠããããšã§ããããªããããå¿ èŠãããã®ã¯ã圌ã«å°ããã ãã§ã...ãããŠã圌ãèšãããšãæ£ãã解éããããšã¯ããå°ãè€éã«ãªããŸãã
次ã®æ å ±ã¯ããã¹ãŠã®æåŸ ãå¿é ãããã®åå ãç解ããŠãã人åãã§ãã æåŸ ã¯åžžã«çããŸãã ããããSQL Serverã®äœæ¥ã¹ã±ãžã¥ãŒãªã³ã°ã·ã¹ãã ã®ä»çµã¿ã§ãã
ã¹ã¬ããã¯ããã»ããµã䜿çšãããªãœãŒã¹ãžã®ã¢ã¯ã»ã¹ãåŸ æ©ããå¿ èŠã«çŽé¢ãããŸã§ã¹ããŒã¿ã¹ããå®è¡äžãã«ãªããŸãã ãã®å Žåãäžæåæ¢ç¶æ ïŒSUSPENDEDïŒã®ã¹ã¬ããã®é åºãªããªã¹ãã«é 眮ãããŸãã åæã«ãFIFOã®ååïŒå å ¥ãå åºãïŒã«åŸã£ãŠç·šæãããã¹ããŒã¿ã¹ããå®è¡å¯èœãïŒRUNNABLEïŒã§ããããã»ããµãžã®ã¢ã¯ã»ã¹ãåŸ æ©ããŠããã¹ã¬ããã®ãã¥ãŒå ã®æ¬¡ã®ã¹ã¬ããã¯ãããã»ããµãžã®ã¢ã¯ã»ã¹ãååŸããŠãå®è¡äžãã«ãªããŸãã ãäžæåæ¢ãç¶æ ã®ã¹ã¬ãããããã®ãªãœãŒã¹ã䜿çšå¯èœã§ãããšããéç¥ãåãåããšããå®è¡æºåå®äºãã«ãªããå®è¡æºåãæŽã£ãã¹ã¬ããã®ãã¥ãŒã®æåŸã«é 眮ãããŸãã ãããŒã¯ãã¿ã¹ã¯ãå®äºãããŸã§ããã§ãŒã³ãå®è¡äžã-ãäžæåæ¢äžã-ãå®è¡æºåå®äºãã«æ²¿ã£ãŠåšæçãªåããç¶ããŸãã åç管çãã¥ãŒïŒDMVïŒsys.dm_exec_requestsã䜿çšããŠãããã»ã¹ãšãã®ã¹ããŒã¿ã¹ã確èªã§ããŸãã
SQL Serverã¯ãã¹ã¬ãããå®è¡ç¶æ ãçµäºããŠãããã®ç¶æ ã«æ»ããŸã§ã®çµéæéãç£èŠããããããåŸ æ©æéããšããŠå®çŸ©ããæºåå®äºç¶æ ã§è²»ãããæéããæéããšããŠå®çŸ©ããŸããä¿¡å·åŸ æ©æéããã€ãŸã ããã»ããµã«ã¢ã¯ã»ã¹ããããã«ãªãœãŒã¹ã®å¯çšæ§ã«é¢ããã·ã°ãã«ãåä¿¡ããåŸãã¹ã¬ãããå¿ èŠãšããæéã åèšã¿ã€ã ã¢ãŠãããä¿¡å·ã¿ã€ã ã¢ãŠããåŒãããšã«ãããã¹ã¬ãããããªãœãŒã¹åŸ æ©æéããšåŒã°ãããäžæåæ¢ãç¶æ ã§è²»ããæéãç解ããå¿ èŠããããŸãã
ããã«ã€ããŠèªãããšããå§ãããåªããæ å ±æºã¯ãåŸ æ©çµ±èšã«é¢ããæ°ããïŒ2014幎ïŒææžãæåŸ å€çµ±èšã䜿çšããSQL Serverããã©ãŒãã³ã¹ã®èª¿æŽïŒåå¿è åãã¬ã€ãã ïŒè±èªïŒã§ãã ãŸããã¯ããã«å€ãããã¥ã¡ã³ãïŒ æåŸ ãšãã¥ãŒã䜿çšããããã©ãŒãã³ã¹ç®¡ç ïŒè±èªïŒã«ã¯å€ãã®æçšãªæ å ±ããããŸãããçŸæç¹ã§ã¯ããªãæ代é ãã§ããããŸããŸãªã¿ã€ãã®æåŸ ïŒããã³çæããã¯ã®ã¯ã©ã¹ïŒã®æè¯ã®ãã¥ãŒããªã¢ã«ã¯ã æåŸ ã®å æ¬çãªã©ã€ãã©ãªã§ãïŒ ïŒè±èªïŒããã³çæãã㯠ïŒè±èªïŒã
DMV sys.dm_os_wait_statsã䜿çšããŠã环ç©åŸ æ©çµ±èšã«ã€ããŠSQL Serverãç §äŒã§ããŸãã å€ãã®äººã¯ãDMVåŒã³åºããäœããã®èŠçŽã³ãŒãã§ã©ããããããšã奜ã¿ãŸãã 以äžã¯ã2016幎æç¹ã§ã®ç§ã®ã¹ã¯ãªããã®ææ°ããŒãžã§ã³ã§ããããã¯ãã¹ãŠã®ããŒãžã§ã³ã§åäœããSQL Server 2016ã®åŸ æ©ã¿ã€ããå«ãŸããŠããŸãïŒAzure ã§äœ¿çšããã¹ã¯ãªããã®ããŒãžã§ã³ã¯ãã¡ããã芧ãã ãã ïŒã
WITH [Waits] AS (SELECT [wait_type], [wait_time_ms] / 1000.0 AS [WaitS], ([wait_time_ms] - [signal_wait_time_ms]) / 1000.0 AS [ResourceS], [signal_wait_time_ms] / 1000.0 AS [SignalS], [waiting_tasks_count] AS [WaitCount], 100.0 * [wait_time_ms] / SUM ([wait_time_ms]) OVER() AS [Percentage], ROW_NUMBER() OVER(ORDER BY [wait_time_ms] DESC) AS [RowNum] FROM sys.dm_os_wait_stats WHERE [wait_type] NOT IN ( N'BROKER_EVENTHANDLER', N'BROKER_RECEIVE_WAITFOR', N'BROKER_TASK_STOP', N'BROKER_TO_FLUSH', N'BROKER_TRANSMITTER', N'CHECKPOINT_QUEUE', N'CHKPT', N'CLR_AUTO_EVENT', N'CLR_MANUAL_EVENT', N'CLR_SEMAPHORE', -- Maybe uncomment these four if you have mirroring issues N'DBMIRROR_DBM_EVENT', N'DBMIRROR_EVENTS_QUEUE', N'DBMIRROR_WORKER_QUEUE', N'DBMIRRORING_CMD', N'DIRTY_PAGE_POLL', N'DISPATCHER_QUEUE_SEMAPHORE', N'EXECSYNC', N'FSAGENT', N'FT_IFTS_SCHEDULER_IDLE_WAIT', N'FT_IFTSHC_MUTEX', -- Maybe uncomment these six if you have AG issues N'HADR_CLUSAPI_CALL', N'HADR_FILESTREAM_IOMGR_IOCOMPLETION', N'HADR_LOGCAPTURE_WAIT', N'HADR_NOTIFICATION_DEQUEUE', N'HADR_TIMER_TASK', N'HADR_WORK_QUEUE', N'KSOURCE_WAKEUP', N'LAZYWRITER_SLEEP', N'LOGMGR_QUEUE', N'MEMORY_ALLOCATION_EXT', N'ONDEMAND_TASK_QUEUE', N'PREEMPTIVE_XE_GETTARGETSTATE', N'PWAIT_ALL_COMPONENTS_INITIALIZED', N'PWAIT_DIRECTLOGCONSUMER_GETNEXT', N'QDS_PERSIST_TASK_MAIN_LOOP_SLEEP', N'QDS_ASYNC_QUEUE', N'QDS_CLEANUP_STALE_QUERIES_TASK_MAIN_LOOP_SLEEP', N'QDS_SHUTDOWN_QUEUE', N'REDO_THREAD_PENDING_WORK', N'REQUEST_FOR_DEADLOCK_SEARCH', N'RESOURCE_QUEUE', N'SERVER_IDLE_CHECK', N'SLEEP_BPOOL_FLUSH', N'SLEEP_DBSTARTUP', N'SLEEP_DCOMSTARTUP', N'SLEEP_MASTERDBREADY', N'SLEEP_MASTERMDREADY', N'SLEEP_MASTERUPGRADED', N'SLEEP_MSDBSTARTUP', N'SLEEP_SYSTEMTASK', N'SLEEP_TASK', N'SLEEP_TEMPDBSTARTUP', N'SNI_HTTP_ACCEPT', N'SP_SERVER_DIAGNOSTICS_SLEEP', N'SQLTRACE_BUFFER_FLUSH', N'SQLTRACE_INCREMENTAL_FLUSH_SLEEP', N'SQLTRACE_WAIT_ENTRIES', N'WAIT_FOR_RESULTS', N'WAITFOR', N'WAITFOR_TASKSHUTDOWN', N'WAIT_XTP_RECOVERY', N'WAIT_XTP_HOST_WAIT', N'WAIT_XTP_OFFLINE_CKPT_NEW_LOG', N'WAIT_XTP_CKPT_CLOSE', N'XE_DISPATCHER_JOIN', N'XE_DISPATCHER_WAIT', N'XE_TIMER_EVENT') AND [waiting_tasks_count] > 0 ) SELECT MAX ([W1].[wait_type]) AS [WaitType], CAST (MAX ([W1].[WaitS]) AS DECIMAL (16,2)) AS [Wait_S], CAST (MAX ([W1].[ResourceS]) AS DECIMAL (16,2)) AS [Resource_S], CAST (MAX ([W1].[SignalS]) AS DECIMAL (16,2)) AS [Signal_S], MAX ([W1].[WaitCount]) AS [WaitCount], CAST (MAX ([W1].[Percentage]) AS DECIMAL (5,2)) AS [Percentage], CAST ((MAX ([W1].[WaitS]) / MAX ([W1].[WaitCount])) AS DECIMAL (16,4)) AS [AvgWait_S], CAST ((MAX ([W1].[ResourceS]) / MAX ([W1].[WaitCount])) AS DECIMAL (16,4)) AS [AvgRes_S], CAST ((MAX ([W1].[SignalS]) / MAX ([W1].[WaitCount])) AS DECIMAL (16,4)) AS [AvgSig_S], CAST ('https://www.sqlskills.com/help/waits/' + MAX ([W1].[wait_type]) as XML) AS [Help/Info URL] FROM [Waits] AS [W1] INNER JOIN [Waits] AS [W2] ON [W2].[RowNum] <= [W1].[RowNum] GROUP BY [W1].[RowNum] HAVING SUM ([W2].[Percentage]) - MAX( [W1].[Percentage] ) < 95; -- percentage threshold GO
ã¯ãšãªçµæã«ã¯ãã·ã¹ãã å ã®ãã¹ãŠã®æåŸ å€ã®å²åã§ã°ã«ãŒãåãããæåŸ å€ãéé ã§è¡šç€ºãããŸãã ïŒæœåšçã«ïŒæ³šæãæã䟡å€ãããæåŸ ã¯ãªã¹ãã®äžçªäžã«ãããSQL Serverãæéãè²»ããã»ãšãã©ã®æåŸ ãè¡šããŠããŸãã èæ ®ããé€å€ãããæåŸ å€ã®å€§ããªãªã¹ãã衚瀺ãããŸããåè¿°ããããã«ããããã¯åžžã«çºçããäžã«ãªã¹ãããããã®ã¯éåžžç¡èŠã§ããŸãã
ãã®ã³ãŒãã䜿çšããŠããµãŒããŒã«ãã£ãŠèç©ãããçµ±èšããªã»ããããããšãã§ããŸãã
DBCC SQLPERF (N'sys.dm_os_wait_stats', CLEAR); GO
ãããŠãã¡ãããçµæãæ°æéããšãŸãã¯æ¯æ¥ä¿åããæéåæãè¡ã£ãŠå€æŽã®æ¹åãææ¡ããããåé¡ãçºçãå§ããå Žåã«èªåçã«åé¡ã远跡ãããããããšãã§ããŸãã
ããã©ãŒãã³ã¹ããã·ã¥ããŒãã䜿çšããŠãSQL Server 2005ã®çµæãšSQL Server 2008ã®ããŒã¿ã³ã¬ã¯ã¿ãã°ã©ãã£ã«ã«ã«è¡šç€ºããããšãã§ããŸããSQLServer 2000ã§ã¯ãDBCC SQLPERFïŒN'waitstats 'ïŒã䜿çšã§ããŸãã
çµæãåŸãããããããããã©ã®ããã«è§£éããã©ããèŠããã«ã€ããŠèãå§ããã§ãããã 以åã«åç §ããããã¥ã¡ã³ãã«ã¯ãã»ãšãã©ã®ã¿ã€ãã®æåŸ ã«é¢ããè±å¯ãªæ å ±ããããŸãïŒSQL Server 2008ã§è¿œå ããããã®ãé€ãïŒã
ããã§ãå°ãåã«å ¬éããç 究ã®çµæãæäŸããããšæããŸãã äžèšã®ã³ãŒããå®è¡ããŠçµæãç¥ãããŠãã ããã 1823å°ã®ãµãŒããŒãã倧éã®çµæãåºãŸãã-ããããšãïŒ
以äžã¯ãçµæã®ã°ã©ã衚瀺ã§ãã
ã¯ã©ã€ã¢ã³ãã·ã¹ãã ã§äœåºŠãèŠãçµæãããã4ã®çµæã«ã¯ãŸã£ããé©ããŸããã
ç§ã®èšäºã®ç¶ãã§ã¯ã調æ»åçè ãæäŸããæã人æ°ã®ããã¿ã€ãã®æåŸ å€ãéé ã§ãªã¹ãããããããããªãã®ã·ã¹ãã ã®åºæ¬ã§ããå Žåã«æ£ç¢ºã«äœãæå³ã§ããããããã€ãã®èšèã§ã³ã¡ã³ãããŸãã ãªã¹ã圢åŒã¯ãæå®ãããã¿ã€ãã®åŸ æ©ãäž»ãªãã®ã§ããåçè ããã®ã·ã¹ãã ã®æ°ã瀺ããŸãã
- 505ïŒCXPACKET
åæå®è¡ãæå³ããŸãããå¿ ãããåé¡ã§ã¯ãããŸããã 䞊åãªã¯ãšã¹ãã®ã³ãŒãã£ããŒã¿ãŒã¹ã¬ããã¯ãåžžã«ãããã®æåŸ å€ãèç©ããŸãã 䞊åã¹ã¬ãããããžãŒã§ãªãããã¹ã¬ããã®1ã€ããããã¯ãããŠããå ŽåãåŸ æ©äžã®ã¹ã¬ãããCXPACKETåŸ æ©ãèç©ããŸããããã«ããããã®ã¿ã€ãã®çµ±èšã®èç©ãéããªããŸã-ãããåé¡ã§ãã 1ã€ã®ã¹ã¬ããã¯ä»ã®ã¹ã¬ãããããå€ãã®äœæ¥ãè¡ãå Žåããããããé·ãã¹ã¬ãããäœæ¥ãå®äºãããŸã§ãªã¯ãšã¹ãå šäœããããã¯ãããŸãã ãã®ã¿ã€ãã®åŸ æ©ã倧ããªåŸ æ©æ¡PAGEIOLATCH_XXãšçµã¿åããããŠããå Žåãããã¯äžæ£ç¢ºãªéã¯ã©ã¹ã¿ãŒåã€ã³ããã¯ã¹ãŸãã¯äžé©åãªã¯ãšãªå®è¡ãã©ã³ã®ããã«ã倧ããªããŒãã«ã®ã¹ãã£ã³ã§ããå¯èœæ§ããããŸãã ãããçç±ã§ãªãå Žåã¯ãåé¡ã®ããã¯ãšãªãŸãã¯ãµãŒããŒã€ã³ã¹ã¿ã³ã¹å šäœã«å¯ŸããŠã4ã2ããŸãã¯1ã®å€ã§MAXDOPãªãã·ã§ã³ã䜿çšããŠã¿ãŠãã ããïŒãmax degree of parallelismããã©ã¡ãŒã¿ãŒã§ãµãŒããŒã«èšå®ãããŸãïŒã ã·ã¹ãã ãNUMAåè·¯ã«åºã¥ããŠããå Žåã¯ãMAXDOPãåäžã®NUMAããŒãã®ããã»ããµæ°ã«èšå®ããŠããããåé¡ã§ãããã©ãããå€æããŠãã ããã ãŸããæ··åšè² è·ã·ã¹ãã ã«MAXDOPãã€ã³ã¹ããŒã«ããå Žåã®åœ±é¿ãå€æããå¿ èŠããããŸãã æ£çŽã«èšããšãã€ã³ã¹ã¿ã³ã¹å šäœã®MAXDOPå€ãäžããåã«ãã䞊ååŠçã®ã³ã¹ããããå€ããã©ã¡ãŒã¿ãŒãè©ŠããŠã¿ãŸãïŒæåã¯25ã«äžããŸãïŒã ãŸããSQL Server 2008ã®ãšã³ã¿ãŒãã©ã€ãºããŒãžã§ã³ã®ãªãœãŒã¹ã¬ãããŒãå¿ããªãã§ãã ãããããã«ããããµãŒããŒæ¥ç¶ã®ç¹å®ã®ã°ã«ãŒãã«ããã»ããµæ°ãèšå®ã§ããŸãã - 304ïŒPAGEIOLATCH_XX
ããã¯ãSQL Serverããã£ã¹ã¯ããã¡ã¢ãªãžã®ããŒã¿ããŒãžã®èªã¿åããåŸ æ©ããå Žæã§ãã ãã®ã¿ã€ãã®åŸ æ©ã¯ãI / Oã·ã¹ãã ã®åé¡ïŒãã®ã¿ã€ãã®åŸ æ©ã«å¯Ÿããæåã®åå¿ïŒã瀺ããŠããå¯èœæ§ããããŸããããªãI / Oã·ã¹ãã ã¯éåžžã«å€ãã®èªã¿åããåŠçããå¿ èŠããããŸããïŒ ããããããããã¡ããŒã«/ã¡ã¢ãªïŒéåžžã®è² è·ã«ååãªã¡ã¢ãªã§ã¯ãªãïŒãå®è¡èšç»ã®çªç¶ã®å€æŽãããã³æ€çŽ¢ã§ã¯ãªã倧èŠæš¡ãªäžŠåã¹ãã£ã³ã«ã€ãªããå§åããã©ã³ãã£ãã·ã¥ã®è¥å€§åããŸãã¯ãã®ä»ã®çç±ã«ãã£ãŠå§åããããããŠããŸãã å ¥å/åºåã·ã¹ãã ã®äž»ãªåé¡ãæ³å®ããªãã§ãã ããã - 275ïŒASYNC_NETWORK_IO
ããã§ãSQL Serverã¯ã¯ã©ã€ã¢ã³ããããŒã¿ã®åä¿¡ãå®äºããã®ãåŸ ã¡ãŸãã ãã®çç±ã¯ãã¯ã©ã€ã¢ã³ãã倧éã®ããŒã¿ãèŠæ±ããããã³ãŒããæªãããã«ããŒã¿ãåä¿¡ããã®ãé ããããããããããŸããããããã¯ãŒã¯ã§åé¡ãèŠãããšã¯ã»ãšãã©ãããŸããã ã¯ã©ã€ã¢ã³ãã¯ãå€ãã®å Žåãã¯ã©ã€ã¢ã³ãã«ããŒã¿ããã£ãã·ã¥ããããã«èªã¿åããçµäºããããSQL Serverã«éç¥ãã代ããã«ãäžåºŠã«1è¡ïŒããããRBARãŸãã¯Row-By-Agonizing-RowïŒãèªã¿åããŸãã - 112ïŒWRITELOG
ãã°ç®¡çãµãã·ã¹ãã ã¯ããã°ããã£ã¹ã¯ã«æžã蟌ãŸããã®ãåŸ ã£ãŠããŸãã ååãšããŠãå ¥å/å ¥åã·ã¹ãã ã¯ãã°ã®ããªã¥ãŒã å šäœã®ã¿ã€ã ãªãŒãªèšé²ãæäŸã§ããªãããšãæå³ããŸãããé«è² è·ã®ã·ã¹ãã ã§ã¯ããã°èšé²ã®äžè¬çãªå¶éãåå ã§ããå¯èœæ§ããããè€æ°ã®ããŒã¿ããŒã¹éã§è² è·ãå ±æãããããã©ã³ã¶ã¯ã·ã§ã³ãäœæããå¿ èŠãããå ŽåããããŸããã£ã¹ã¯ãžã®ãã°ãšã³ããªã®æ°ãæžããããã«å°ãé·ããªããŸãã åå ãI / Oã·ã¹ãã ã«ããããšã確èªããã«ã¯ãDMV sys.dm_io_virtual_file_statsã䜿çšããŠãã°ãã¡ã€ã«ã®I / Oé 延ã調ã¹ãWRITELOGé 延æéãšäžèŽãããã©ããã確èªããŸãã WRITELOGã®æç¶æéãé·ãå Žåã¯ããã£ã¹ã¯ãžã®æžã蟌ã¿ã«é¢ããŠå éšç«¶åãçºçããŠãããããè² è·ãåæ ããå¿ èŠããããŸãã ããã§ãªãå Žåã¯ããªããã®ãããªå€§ããªãã©ã³ã¶ã¯ã·ã§ã³ãã°ãäœæããã®ãã調ã¹ãŠãã ããã ãã ïŒè±èªïŒããã³ãã ïŒè±èªïŒããã€ãã®ã¢ã€ãã¢ãåéã§ããŸãã
ïŒç¿»èš³è ã®ã¡ã¢ïŒæ¬¡ã®ã¯ãšãªã䜿çšãããšããµãŒããŒäžã®åããŒã¿ããŒã¹ã®åãã¡ã€ã«ã®I / Oé 延ã«é¢ããçµ±èšãç°¡åãã€äŸ¿å©ãªæ¹æ³ã§ååŸã§ããŸãã
é衚瀺ã®ããã¹ã-- : . > 20 USE master GO SELECT cast(db_name(a.database_id) AS VARCHAR) AS Database_Name , b.physical_name --, a.io_stall , a.size_on_disk_bytes , a.io_stall_read_ms / a.num_of_reads '. ' , a.io_stall_write_ms / a.num_of_writes '. ' --, * FROM sys.dm_io_virtual_file_stats(NULL, NULL) a INNER JOIN sys.master_files b ON a.database_id = b.database_id AND a.file_id = b.file_id where num_of_writes > 0 and num_of_reads > 0 ORDER BY Database_Name , a.io_stall DESC
- 109ïŒBROKER_RECEIVE_WAITFOR
ããã§ãService Brokerã¯æ°ããã¡ãã»ãŒãžãåŸ ã£ãŠããŸãã ãã®æåŸ å€ãé€å€ãªã¹ãã«è¿œå ããåŸ æ©çµ±èšã䜿çšããŠã¯ãšãªãåå®è¡ããããšããå§ãããŸãã - 086ïŒMSQL_XP
ããã§ãSQL Serverã¯æ¡åŒµã¹ãã¢ãããã·ãŒãžã£ã®å®è¡ãåŸ ã¡ãŸãã ããã¯ãæ¡åŒµã¹ãã¢ãããã·ãŒãžã£ã®ã³ãŒãã«åé¡ãããå¯èœæ§ããããŸãã - 074ïŒOLEDB
ååã瀺ãããã«ãããã¯OLEDBã䜿çšããçžäºäœçšã®æåŸ ã§ã-ããšãã°ããªã³ã¯ãµãŒããŒãšã ãã ããOLEDBã¯DMVããã³DBCC CHECKDBããŒã ã§ã䜿çšãããŠããããããªã³ã¯ãµãŒããŒã«åé¡ããããšã¯æããªãã§ãã ãããDMVåŒã³åºããéå°ã«äœ¿çšããå€éšç£èŠã·ã¹ãã ã§ããå¯èœæ§ããããŸãã ãããå®éã«ãªã³ã¯ãµãŒããŒã§ããå Žåã¯ããªã³ã¯ãµãŒããŒã®æåŸ å€ãåæããããã©ãŒãã³ã¹ã®åé¡ãç¹å®ããŸãã - 054ïŒããã¯ã¢ãã
ããŒãã«çŽæ¥ããã¯ã¢ãããããšãã«è¡šç€ºãããŸããããã¯éåžžã«é ãã§ãã ç§ã¯ããããã®æåŸ ãé€å€ããŸãã ïŒç¿»èš³è ã®ã¡ã¢ïŒãã£ã¹ã¯ã«ããã¯ã¢ãããæžã蟌ããšãã«ãã®ã¿ã€ãã®æåŸ ã«å¿ããŸããããå°ããªããŒã¿ããŒã¹ã®ããã¯ã¢ããã«ã¯éåžžã«é·ãæéãããããæè¡çãªäžæäžã«å®è¡ããæéããªãããŠãŒã¶ãŒã«ããã©ãŒãã³ã¹ã®åé¡ãåŒãèµ·ãããŸããããããå ¥åã·ã¹ãã ã§ããå¯èœæ§ããããŸã/ããã¯ã¢ããã«äœ¿çšãããåºåã¯ãçç£æ§ãé«ããå¯èœæ§ãæ€èšãããããµãŒãã¹ãã©ã³ãä¿®æ£ããå¿ èŠããããŸãïŒçãæè¡çãªäžæã§å®å šããã¯ã¢ãããå®äºãããå·®åããã¯ã¢ããã«çœ®ãæããŠãã ããïŒ - 041ïŒLCK_M_XX
ããã§ã¯ãã¹ã¬ããã¯åã«ãªããžã§ã¯ãã®ããã¯ãžã®ã¢ã¯ã»ã¹ãåŸ æ©ããããã¯ã®åé¡ãæå³ããŸãã ããã¯ãäžèŠãªããã¯ã®ãšã¹ã«ã¬ãŒã·ã§ã³ãŸãã¯äžæ£ãªã³ãŒãã«ãã£ãŠåŒãèµ·ããããå¯èœæ§ããããŸãããI / Oæäœã«æéãããããããŠãéåžžãããé·ãããã¯ãä¿æããããšã«ãã£ãŠãåŒãèµ·ããããå¯èœæ§ããããŸãã DMV sys.dm_os_waiting_tasksã䜿çšããŠããã¯é¢é£ã®ãªãœãŒã¹ã確èªããŸãã äž»ãªåé¡ãããã¯ã§ãããšæ³å®ããªãã§ãã ããã - 032ïŒONDEMAND_TASK_QUEUE
ããã¯æ£åžžã§ãããããã¯ã°ã©ãŠã³ãã¿ã¹ã¯ã·ã¹ãã ã®äžéšã§ãïŒé 延ãªã»ãããããã¯ã°ã©ãŠã³ãã¯ãªãŒã³ã¢ãããªã©ïŒã ãã®æåŸ ãé€å€ãªã¹ãã«è¿œå ããåŸ æ©çµ±èšã䜿çšããŠã¯ãšãªãåå®è¡ããŸãã - 031ïŒããã¯ã¢ãããããã¡
ããŒãã«çŽæ¥ããã¯ã¢ãããããšãã«è¡šç€ºãããŸããããã¯éåžžã«é ãã§ãã ç§ã¯ããããã®æåŸ ãé€å€ããŸãã - 027ïŒIO_COMPLETION
SQL Serverã¯I / Oã®å®äºãåŸ æ©ããŠããããã®ã¿ã€ãã®åŸ æ©ã¯I / Oã·ã¹ãã ã®åé¡ã®ææšã«ãªãå¯èœæ§ããããŸãã - 024ïŒSOS_SCHEDULER_YIELD
ã»ãšãã©ã®å Žåãããã¯ä»ã®ã¿ã€ãã®æåŸ ã«è©²åœããªãã³ãŒãã§ããã埪ç°ããã¯ã®ç«¶åã«ãªãå ŽåããããŸãã - 022ïŒDBMIRROR_EVENTS_QUEUE
022ïŒDBMIRRORING_CMD
ããã2ã€ã®ã¿ã€ãã¯ãããŒã¿ããŒã¹ãã©ãŒãªã³ã°ã·ã¹ãã ã座ã£ãŠäœããåŸ ã£ãŠããããšã瀺ããŠããŸãã ãããã®æåŸ ãé€å€ãªã¹ãã«è¿œå ããåŸ æ©çµ±èšã䜿çšããŠãªã¯ãšã¹ããåå®è¡ããŸãã - 018ïŒPAGELATCH_XX
ããã¯ãã¡ã¢ãªå ã®ããŒãžã®ã³ããŒã«ã¢ã¯ã»ã¹ããããã®ç«¶äºã§ãã æãããç¥ãããŠããã±ãŒã¹ã¯ãPFSãSGAMãããã³GAMã®ç«¶åã§ãããããã¯ãç¹å®ã®çš®é¡ã®è² è·ã«å¯ŸããŠtempdbããŒã¿ããŒã¹ã§çºçããŸã ã 競åããŠããããŒãžãèŠã€ããã«ã¯ãDMV sys.dm_os_waiting_tasksã䜿çšããŠãã©ã®ããŒãžããããã¯ãåŒãèµ·ãããŠãããã調ã¹ãå¿ èŠããããŸãã tempdbããŒã¿ããŒã¹ã®åé¡ã«é¢ããŠãRobert DavisïŒåœŒã®ããã° ã twitter ïŒã¯ãããã解決ããæ¹æ³ã瀺ãè¯ãèšäºãæžããŸãã ãç§ãèŠããã1ã€ã®äžè¬çãªçç±ã¯ãã·ãªã¢ã«ããŒïŒIDENTITYïŒã䜿çšããã€ã³ããã¯ã¹ãžã®ç«¶åããæ¿å ¥ã§é »ç¹ã«æŽæ°ãããã€ã³ããã¯ã¹ã§ããã - 016ïŒLATCH_XX
ããã¯ãSQL Serverã®éããŒãžæ§é ã«å¯Ÿãã競åã§ãããããã£ãŠãäžè¬çãªI / Oããã³ããŒã¿ãšã¯é¢ä¿ãããŸããã ãã®ã¿ã€ãã®é 延ã®çç±ãç解ããã®ã¯é£ããå ŽåããããDMV sys.dm_os_latch_statsã䜿çšããå¿ èŠããããŸãã - 013ïŒPREEMPTIVE_OS_PIPEOPS
ããã§ãSQL Serverã¯ããã¢ã¯ãã£ãã¹ã±ãžã¥ãŒãªã³ã°ã«åãæ¿ããŠãWindowsã«äœããèŠæ±ããŸãã ãã®ã¿ã€ãã®åŸ æ©ã¯2008ããŒãžã§ã³ã§è¿œå ããããã®ã§ããŸã ææžåãããŠããŸããã ãããäœãæå³ããããç¥ãæãç°¡åãªæ¹æ³ã¯ãæåã®PREEMPTIVE_OS_ãåé€ããMSDNã«æ®ã£ãŠãããã®ãæ¢ãããšã§ã-ããã¯Windows APIã®ååã«ãªããŸãã - 013ïŒã¹ã¬ããããŒã«
ãã®ã¿ã€ãã¯ãã·ã¹ãã ãèŠæ±ãæºããã®ã«ååãªã¯ãŒã¯ãããŒããªãããšã瀺ããŠããŸãã éåžžããã®çç±ã¯ãå€æ°ã®é«åºŠã«äžŠååãããèŠæ±ãå®è¡ããããšããŠããããã§ãã ïŒç¿»èš³è ã®ã¡ã¢ïŒãmax worker threadsããµãŒããŒãã©ã¡ãŒã¿ãŒã®æå³çã«åãæšãŠãããå€ã«ãªãããšããããŸãïŒ - 009ïŒBROKER_TRANSMITTER
ããã§ãService Brokerã¯æ°ããã¡ãã»ãŒãžãéä¿¡ãããã®ãåŸ ã£ãŠããŸãã ãã®æåŸ å€ãé€å€ãªã¹ãã«è¿œå ããåŸ æ©çµ±èšã䜿çšããŠã¯ãšãªãåå®è¡ããããšããå§ãããŸãã - 006ïŒSQLTRACE_WAIT_ENTRIES
SQL Serverã®ãã¬ãŒã¹éšåã ãã®æåŸ å€ãé€å€ãªã¹ãã«è¿œå ããåŸ æ©çµ±èšã䜿çšããŠã¯ãšãªãåå®è¡ããããšããå§ãããŸãã - 005ïŒDBMIRROR_DBM_MUTEX
ããã¯ææžåãããŠããªãã¿ã€ãã®1ã€ã§ãããããŒã¿ããŒã¹ãã©ãŒãªã³ã°ã»ãã·ã§ã³éã§å ±æããããããã¡ãŒãéä¿¡ããããã®ç«¶åããããŸãã ãã©ãŒãªã³ã°ã»ãã·ã§ã³ãå€ãããããšãæå³ããå ŽåããããŸãã - 005ïŒRESOURCE_SEMAPHORE
ããã§ã¯ãã¯ãšãªã¯ã¡ã¢ãªã®å®è¡ãåŸ æ©ããŸãïŒãœãŒããªã©ã®ã¯ãšãªæŒç®åã®åŠçã«äœ¿çšãããã¡ã¢ãªïŒã ããã¯ã競åè² è·ã§ã®ã¡ã¢ãªäžè¶³ã®å¯èœæ§ããããŸãã - 003ïŒPREEMPTIVE_OS_AUTHENTICATIONOPS
003ïŒPREEMPTIVE_OS_GENERICOPS
ããã§ãSQL Serverã¯ããã¢ã¯ãã£ãã¹ã±ãžã¥ãŒãªã³ã°ã«åãæ¿ããŠãWindowsã«äœããèŠæ±ããŸãã ãã®ã¿ã€ãã®åŸ æ©ã¯2008ããŒãžã§ã³ã§è¿œå ããããã®ã§ããŸã ææžåãããŠããŸããã ãããäœãæå³ããããç¥ãæãç°¡åãªæ¹æ³ã¯ãæåã®PREEMPTIVE_OS_ãåé€ããMSDNã«æ®ã£ãŠãããã®ãæ¢ãããšã§ã-ããã¯Windows APIã®ååã«ãªããŸãã - 003ïŒSLEEP_BPOOL_FLUSH
ãã®æåŸ ã¯ãã°ãã°èŠãããI / Oã·ã¹ãã ã®éè² è·ãåé¿ããããã«ãã¬ãŒã¯ãã€ã³ãèªäœãå¶éãããããšãæå³ããŸãã ãã®æåŸ å€ãé€å€ãªã¹ãã«è¿œå ããåŸ æ©çµ±èšã䜿çšããŠã¯ãšãªãåå®è¡ããããšããå§ãããŸãã - 002ïŒMSQL_DQ
ããã§ãSQL Serverã¯åæ£ã¯ãšãªãå®è¡ãããã®ãåŸ ã¡ãŸãã ããã¯ãåæ£ãªã¯ãšã¹ãã«åé¡ãããããšã瀺ããŠããå ŽåããããŸãããåã«æšæºçãªå ŽåããããŸãã - 002ïŒRESOURCE_SEMAPHORE_QUERY_COMPILE
ã·ã¹ãã å ã®ã¯ãšãªã®ç«¶åããåã³ã³ãã€ã«ãå€ãããå ŽåãSQL Serverã¯å®è¡ãå¶éããŸãã å¶éã®ã¬ãã«ã¯èŠããŠããŸãããããã®æåŸ ã¯éå°ãªåã³ã³ãã€ã«ããŸãã¯ãããããäžåºŠéãã®ãã©ã³ã®é »ç¹ãªäœ¿çšãæå³ããå ŽåããããŸãã - 001ïŒDAC_INIT
ç§ã¯ãããåã«èŠãããšããªãããã®çç±ã¯ç®¡çæ¥ç¶ã®åæåã§ãããšBOLã¯èšããŸãã ãããã©ã®ããã«èª°ãã®ã·ã¹ãã ã®åªå äºé ã«ãªãã®ãæ³åã§ããŸãã... - 001ïŒMSSEARCH
ãã®ã¿ã€ãã¯ããã«ããã¹ãæäœã§ã¯æ£åžžã§ãã ãããå å¶çãªæåŸ ã§ããå Žåãã·ã¹ãã ããã«ããã¹ãã¯ãšãªã®å®è¡ã«æãæéãè²»ãããŠããããšãæå³ããå ŽåããããŸãã ãã®ã¿ã€ãã®åŸ æ©ãé€å€ãªã¹ãã«è¿œå ããããšãæ€èšããŠãã ããã - 001ïŒPREEMPTIVE_OS_FILEOPS
001ïŒPREEMPTIVE_OS_LIBRARYOPS
001ïŒPREEMPTIVE_OS_LOOKUPACCOUNTSID
001ïŒPREEMPTIVE_OS_QUERYREGISTRY
ããã§ãSQL Serverã¯ããã¢ã¯ãã£ãã¹ã±ãžã¥ãŒãªã³ã°ã«åãæ¿ããŠãWindowsã«äœããèŠæ±ããŸãã ãã®ã¿ã€ãã®åŸ æ©ã¯2008ããŒãžã§ã³ã§è¿œå ããããã®ã§ããŸã ææžåãããŠããŸããã ãããäœãæå³ããããç¥ãæãç°¡åãªæ¹æ³ã¯ãæåã®PREEMPTIVE_OS_ãåé€ããMSDNã«æ®ã£ãŠãããã®ãæ¢ãããšã§ã-ããã¯Windows APIã®ååã«ãªããŸãã - 001ïŒSQLTRACE_LOCK
SQL Serverã®ãã¬ãŒã¹éšåã ãã®æåŸ å€ãé€å€ãªã¹ãã«è¿œå ããåŸ æ©çµ±èšã䜿çšããŠã¯ãšãªãåå®è¡ããããšããå§ãããŸãã
ãããããã£ãïŒ å ·äœçã«äœãã«èå³ããããããã®èšäºãèªãã§æ¥œããã ãæããŠãã ããïŒ