Vi. other optimization methods of MySQL Database
In the last chapter, we talk about some optimization methods that are not covered before.
1. My.ini configuration file
Here are only two of the most important, but the others are more.
1) Configure the maximum number of connections
The default is 100, and the recommended setting is 1000
2) Configure the cache
On the My.ini [mysqld] node, open the query cache, configured as follows
Query_cache_size = 268435456
Query_cache_type = 1
Query_cache_limit = 1048576
2. Using Stored Procedures
The advantage of a stored procedure relative to a SQL statement is that it does not need to be compiled and that the process is an already compiled object
3. Split horizontally
When one is getting bigger and larger, we can use sub-tables even if the index is slow.
4. Page static
Save the last static page generated by each request to the server, and then display the static page directly if you have the same request at a later time.
The entire database tuning tutorial to this the paragraph fell, is the experience of their own learned to write in, if the students think there is anything to add, there is no place to write bad, welcome to Exchange ha.
Database Tuning Tutorial (13) MySQL database other optimization methods