Current location - Quotes Website - Signature design - What is the maximum concurrency that mysql database can support?
What is the maximum concurrency that mysql database can support?
The maximum number of concurrent connections for MySQL server is 16384.

Limited by the server configuration and network environment, the number of concurrent connections supported by the actual server will be less. The main determinants are:

1, configuration of server CPU and memory.

2. Bandwidth of the network. The influence of upstream bandwidth in Internet connection is particularly obvious.

Extended data:

Optimize the database structure:

Organize the database schema, tables and fields to reduce the I/O overhead, save related items together, and plan in advance, so that with the growth of data volume, the performance can also maintain a high level.

The space occupied by the design data table should be minimized and the primary key of the table should be as short as possible. For the InnoDB table, the column where the primary key is located can be copied in each auxiliary index entry, so if there are many auxiliary indexes, a short primary key can save a lot of space.

Create only indexes that need to improve query performance. Indexes help retrieval, but increase the execution time of insert and update operations.

InnoDB's ChangeBuffering feature:

InnoDB provides the configuration of changebuffering, which can reduce the disk I/O required to maintain the secondary index. A large database may encounter a lot of table operations and a lot of I/O to ensure that the secondary index is kept up to date. When the related page is not in the buffer pool, InnoDB's changebuffer will change the cache to a secondary index entry.

Thereby avoiding the time-consuming I/O operation caused by the inability to read the page from the disk immediately. When the page is loaded into the buffer pool, the buffered changes will be merged, and the updated page will be refreshed to disk later. Doing so can improve performance and is suitable for MySQL5.5 and later.

Baidu encyclopedia -MySQL database