您好,登錄后才能下訂單哦!
這篇文章將為大家詳細講解有關mysql中最大連接數、最大并發線程數的區別有哪些,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
show variables like 'max_connections'
max_connections:支持的最大并發連接數
The maximum permitted number of simultaneous client connections
show variables like 'innodb_thread_concurrency'
innodb_thread_concurrency:支持的最大并發執行的線程數
InnoDB tries to keep the number of operating system threads concurrently inside InnoDB less than or equal to the limit given by this variable (InnoDB uses operating system threads to process user transactions). Once the number of threads reaches this limit, additional threads are placed into a wait state within a “First In, First Out” (FIFO) queue for execution. Threads waiting for locks are not counted in the number of concurrently executing threads.
thread_concurrency:支持的最大并發執行的線程數
這個變量特定于Solaris 8和更早的系統,允許應用程序向線程系統提示應該同時運行的線程數量。MySQL 5.7.2中刪除了這個變量。
This variable is specific to Solaris 8 and earlier systems, for which mysqld invokes the thr_setconcurrency() function with the variable value. This function enables applications to give the threads system a hint about the desired number of threads that should be run at the same time. Current Solaris versions document this as having no effect.This variable was removed in MySQL 5.7.2.
查看服務器的連接次數
show status like 'Connections';
查看曾經的最大連接數
show status like 'Max_used_connections';
查看當前連接的線程數
show status like 'Threads_connected';
查看當前正在運行的線程數
show status like 'threads_running';
查看線程緩存中的線程數
show status like 'threads_cached';
關于“mysql中最大連接數、最大并發線程數的區別有哪些”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。