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

Interpretation of Vue component registration method

Table of contents Overview 1. Global Registration...

How to create, start, and stop a Docker container

1. A container is an independently running applic...

Completely uninstall MySQL database in Windows system to reinstall MySQL

1. In the control panel, uninstall all components...

Implementation of services in docker accessing host services

Table of contents 1. Scenario 2. Solution 3. Conc...

Summary of the benefits of deploying MySQL delayed slaves

Preface The master-slave replication relationship...

vue-router hook function implements routing guard

Table of contents Overview Global hook function R...

Practice of realizing Echarts chart width and height adaptation in Vue

Table of contents 1. Install and import 2. Define...

Docker runs operations with specified memory

as follows: -m, --memory Memory limit, the format...

Usage of HTML H title tag

The usage of H tags, especially h1, has always bee...

Introduction to Docker Architecture

Docker includes three basic concepts: Image: A Do...

Tutorial on using $attrs and $listeners in Vue

Table of contents introduce Example Summarize int...

Summary of common problems and application skills in MySQL

Preface In the daily development or maintenance o...

A brief discussion on the optimization of MySQL paging for billions of data

Table of contents background analyze Data simulat...

Example of how to build a Mysql cluster with docker

Docker basic instructions: Update Packages yum -y...