溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶(hù)服務(wù)條款》

slow_launch_time和long_query_time

發(fā)布時(shí)間:2020-10-18 06:51:36 來(lái)源:網(wǎng)絡(luò) 閱讀:4304 作者:淚之物語(yǔ) 欄目:數(shù)據(jù)庫(kù)

1.slow_launch_time

Command-Line Format--slow_launch_time=#
System VariableNameslow_launch_time
Variable ScopeGlobal
Dynamic VariableYes
Permitted ValuesTypeinteger
Default2

If creating a thread takes longer than this many seconds, the server increments the Slow_launch_threadsstatus variable.

如果創(chuàng)建線程需要比slow_launch_time更多的時(shí)間,服務(wù)器會(huì)增加 Slow_launch_threads的狀態(tài)變量。

 Slow_launch_threads

The number of threads that have taken more than slow_launch_time seconds to create.

創(chuàng)建時(shí)間超過(guò)slow_launch_time的線程個(gè)數(shù)。


2.long_query_time

Command-Line Format--long_query_time=#
System VariableNamelong_query_time
Variable ScopeGlobal, Session
Dynamic VariableYes
Permitted ValuesTypenumeric
Default10
Min Value0

If a query takes longer than this many seconds, the server increments the Slow_queries status variable. If the slow query log is enabled, the query is logged to the slow query log file. This value is measured in real time, not CPU time, so a query that is under the threshold on a lightly loaded system might be above the threshold on a heavily loaded one. The minimum and default values of long_query_time are 0 and 10, respectively. The value can be specified to a resolution of microseconds. For logging to a file, times are written including the microseconds part. For logging to tables, only integer times are written; the microseconds part is ignored. 

如果查詢(xún)需要比long_query_time更多的時(shí)間,服務(wù)器會(huì)增加slow_queries的狀態(tài)變量。如果啟用了慢查詢(xún)?nèi)罩?,則查詢(xún)將記錄到慢查詢(xún)?nèi)罩疚募?。此值是?shí)時(shí)測(cè)量的,而不是中央處理器的時(shí)間,所以一個(gè)在輕負(fù)載系統(tǒng)的閾值下的查詢(xún)可能會(huì)高于重負(fù)載的系統(tǒng)的閾值。最小值和默認(rèn)值long_query_time分別為0和10。該值可以精確到微秒。如果記錄到文件中,時(shí)間包括微秒部分。如果記錄到表,只有整數(shù)部分;微秒部分被忽略。

Slow_queries

The number of queries that have taken more than long_query_time seconds. This counter increments regardless of whether the slow query log is enabled.

查詢(xún)時(shí)間超過(guò)long_query_time 的查詢(xún)數(shù)目,這個(gè)數(shù)值的增加與是否啟動(dòng)慢查詢(xún)?nèi)罩緹o(wú)關(guān)。


總結(jié):從上面的內(nèi)容可以看出,slow_launch_time和long_query_time雖然模樣差不多,但是關(guān)系卻沒(méi)那么近。

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI