当前位置:网站首页>Query the thread information of MySQL server (detailed explanation)
Query the thread information of MySQL server (detailed explanation)
2022-07-25 01:50:00 【Xiao Guangbiao】
Inquire about Mysql Server thread information ( Detailed explanation )
During database tuning , We need to understand MySQL Server status information for , for example : At present MySQL Run time after startup , At present MySQL Number of client session connections for , At present MySQL The number of slow queries executed by the server, and so on .
stay MySQL in , We can use SHOW STATUS Command statements to see MySQL Server status information . for example : We can execute show status like ' Thread_%' Check it out. MySQL Server thread information . I don't say much nonsense , The following is a direct post :
-- see MySQL Running time after this startup ( Company : second )
show status like 'uptime';
-- see select The number of statements executed
show [global] status like 'com_select';
-- see insert The number of statements executed
show [global] status like 'com_insert';
-- see update The number of statements executed
show [global] status like 'com_update';
-- see delete The number of statements executed
show [global] status like 'com_delete';
-- View attempts to connect to MySQL( Whether the connection is successful or not ) Connection number
show status like 'connections';
-- View the number of threads in the thread cache .
show status like 'threads_cached';
-- View the number of currently open connections .
show status like 'threads_connected';
-- View the number of currently open connections .
show status like 'threads_connected';
-- View the number of threads created to process connections . If Threads_created more , You may want to increase thread_cache_size value .
show status like 'threads_created';
-- View the active ( Non sleep state ) Number of threads .
show status like 'threads_running';
-- View the number of times the table's locks are acquired immediately .
show status like 'table_locks_immediate';
-- Number of times to view locks on tables that cannot be obtained immediately . If the value is high , And there are performance problems , You should first optimize the query , Then split the table or use replication .
show status like 'table_locks_waited';
-- View created more than slow_launch_time Number of threads per second .
show status like 'slow_launch_threads';
-- View query time exceeds long_query_time Number of queries per second .
show status like 'slow_queries';
If it helps , please “ give the thumbs-up ”、“ Focus on ”、“ Collection ” Ha !
边栏推荐
- Interpretation of video generation paper of fed shot video to video (neurips 2019)
- Guide to the construction of network security testing laboratory - Chapter 1, section 1.5 key terms
- Green low-carbon Tianyi cloud, a new engine of digital economy!
- Service address dynamic awareness of Nacos registry
- 2022.7.20 linear table
- Data integration | what are the tools for data integration at home and abroad?
- Inventory of well-known source code mall systems at home and abroad
- Top priority of dry goods: common indicators and terms in data analysis!
- [25. Hash table]
- Resolution of multi thread conflict lock
猜你喜欢

C#/VB. Net insert watermark in word

Google launched another "man grabbing war" for core making, and Intel's 17 year veteran joined!
![[leetcode] 2. Add two numbers - go language problem solving](/img/26/9b5df9aedc34238ce816cbf8e72066.png)
[leetcode] 2. Add two numbers - go language problem solving

After burning up 130 billion yuan in ten years, vertical e-commerce will eventually enter the dust of history

Eolink - quickly develop interfaces through document driven

iptables :chains, target

Service address dynamic awareness of Nacos registry

Several schemes of traffic exposure in kubernetes cluster

Top priority of dry goods: common indicators and terms in data analysis!

2022.7.20 linear table
随机推荐
PG Optimization -- execution plan
"Nowadays, more than 99.9% of the code is garbage!"
Create thread: pthread_ create
2022.7.20 linear table
Inventory of well-known source code mall systems at home and abroad
6-11 vulnerability exploitation - use the built environment to send emails
Jsonp solves cross domain plug-ins (JS, TS)
Tiktok iqiyi announced cooperation, long and short video handshake and reconciliation?
1260. Two dimensional grid migration: simple construction simulation problem
SAP Spartacus - progressive web applications, progressive web applications
Pychart exits pytest mode (run pytest in mode)
Create the first hbuilder project
Beijing Zhun electric clock, Beidou clock server, GPS network time server, NTP satellite timing system
How to use ES6 async and await (basic)
【Power Shell】Invoke-Expression ,Invoke-Expression -Command $activateCommand; Error or power shell failed to activate the virtual environment
Example analysis of recombinant monoclonal antibody prosci CD154 antibody
Kernel structure and design
[C + + primer notes] Chapter 8 IO Library
Thinkphp5.0.24 deserialization chain analysis
The position of the nth occurrence of MySQL in the string