Several important MySQL variables

Several important MySQL variables

There are many MySQL variables, some of which are worthy of our attention. Here we will introduce some MySQL variables that are worth our focus for your reference.

1 Threads_connected

First of all, you need to note that if you want to get the value of this variable, you cannot show variables like 'Threads_connected'; instead
show status like 'Threads_connected' (the same applies to the following variables);

Meaning: The value of the variable indicates how many clients are currently connected to the MySQL server

Extension: Is there too many connections? There may be a problem with the network! Especially in the case of pconnect :)

2 Created_tmp_disk_tables

Meaning: The number of temporary tables created on the hard disk

Extension: If this value is large, the operation of creating a temporary table (CREATE TEMPORARY TABLE) during query will take more time.

3 Handler_read_first

Meaning: Read the first row of the table index

Extension: If this value changes greatly, it can be considered that there is a problem with the table index establishment, and there are more full index scan operations.

4 Innodb_buffer_pool_wait_free

Meaning: This variable indicates the number of times MySQL has to wait for memory pages to be flushed

Extension:If this variable is high, it suggests that MySQL's memory buffer is incorrectly configured for the amount of writes the server is currently performing.

Didn't understand this :)

5 Key_reads

Meaning: The number of times the index on the file system is read

Extension: If this value is too large, you need to consider whether the key cache settings are normal.

6 Max_used_connections

Meaning: The maximum number of connections since the restart

Extension: Server load and number of connections that may need to be adjusted

7 Open_tables

Meaning: The number of currently open tables

Extension: If this value is very low and the table cache is very large, then reducing the table cache setting is no problem. If this value is very large and close to the table cache value, we need to increase the table cache setting.

8 Select_full_join

Meaning: Number of fully connected queries

Extension: The value is too large, and more indexes need to be created to avoid

9 Slow_queries

Meaning: Number of slow queries

Extension: If it is too large, you should check the slow query log and check whether the SQL statement is written properly.

10 Uptime

Meaning: running time, in seconds

Summarize

The above is all the content of this article about several important MySQL variables. I hope it will be helpful to everyone. Interested friends can refer to: Detailed Explanation of MySQL prepare principles, Analysis of key points of ORACLE SQL statement optimization technology, etc. If you have any questions, you can leave a message at any time and the editor will reply to you in time.

You may also be interested in:
  • MySQL 8.0.12 installation and environment variable configuration tutorial under win10
  • Detailed explanation of two methods for setting global variables and session variables in MySQL
  • MySQL 5.6.23 Installation and Configuration Environment Variables Tutorial
  • MySQL 8 new features: how to modify persistent global variables
  • Code analysis of user variables in mysql query statements
  • MySQL variable declaration and stored procedure analysis
  • MySQL uses variables to implement various sorting
  • A brief discussion on the difference between declare and set variables in MySQL stored procedures
  • MySQL variable principles and application examples

<<:  How to view Docker container application logs

>>:  How to make a List in CocosCreator

Recommend

Element Table table component multi-field (multi-column) sorting method

Table of contents need: Problems encountered: sol...

Implementing a web player with JavaScript

Today I will share with you how to write a player...

Vue implements the magnifying glass effect of tab switching

This article example shares the specific code of ...

Design Reference Beautiful and Original Blog Design

All blogs listed below are original and uniquely ...

CSS container background 10 color gradient Demo (linear-gradient())

grammar background: linear-gradient(direction,col...

An example of elegantly writing status labels in Vue background

Table of contents Preface optimization Extract va...

Detailed steps to install Docker mongoDB 4.2.1 and collect springboot logs

1: Install mongodb in docker Step 1: Install mong...

Continuous delivery using Jenkins and Docker under Docker

1. What is Continuous Delivery The software produ...

Basic statements of MySQL data definition language DDL

MySQL DDL statements What is DDL, DML. DDL is dat...

Docker-compose installation db2 database operation

It is troublesome to install the db2 database dir...

MySQL establishes efficient index example analysis

This article uses examples to describe how to cre...

Summary of B-tree index knowledge points in MySQL optimization

Why do we need to optimize SQL? Obviously, when w...

Summary of 4 methods of div+css layout to achieve 2-end alignment of css

The div+css layout to achieve 2-end alignment is ...