The maintenance table has three main purposes:
1, find and repair the damaged table.
For MyISAM storage engines, table corruption is usually caused by a system crash. Other engines can also cause damage to the index due to hardware problems, MySQL'
A clustered index is not a separate index type, but rather a way of storing data. The InnoDB clustered index actually holds the B-tree index and data row information in the same structure.
Because data rows cannot be stored in two different places,
I. Type of index
In MySQL, the index is implemented at the storage engine layer, not the server layer, so there is no uniform standard.
MySQL supports the following types of indexes:
1, B-tree index (also includes B+tree index, collectively
When you find a problem, determine whether it is a single query or a server problem. If all the programs on the server are slowing down and suddenly getting better, and each query slows down, then the slow query is not necessarily the cause, and
In the previous section we've covered some options, and there are some remaining important options, and let's go on to explain:
First, the basic configuration
Tmp_table_size and Max_heap_table_size
These 2 settings control how much memory can be
In my previous 2 blogs, I have briefly introduced the basic theory of partitioning technology after MySQL5.1 and the table storage files and features of partitioning technology, the blog address is as follows:
http://janephp.blog.51cto.com/4439680/1
When you want to optimize query performance, the best way is to figure out how MySQL optimizes and executes the query. Understand the internal mechanism, in order to better implement the design.
When MySQL executes a query, what exactly does it do,
MysqlCHANGEMASTERTOMASTER_HOSTserver1,
Mysql change master to MASTER_HOST = 'server1',-MASTER_USER = 'repl',-MASTER_PASSWORD = 'p4ssword',-MASTER_LOG_FILE = 'mysql-bin.000001 ',-MASTER_LOG_POS = 0; MASTER_LOG_POS is 0 because it is the start
Many database systems can cache execution plans. For identical SQL statements, you can use existing execution plans to skip the process of parsing and generating execution plans. MYSQL and Oracle provide more advanced query result caching functions.
The database engine uses indexes to improve query efficiency and adds many optimization policies for indexes. However, there are also many details during the indexing process. If you ignore these problems, hard-built indexes may not be well applied,
Background: in actual use of MySQL, if the access volume is large, a large number of Locked processes may occur, but it is difficult to identify which SQL statements are causing problems, when many people encounter such problems, they mostly query
When the data volume is very large (the table capacity reaches GB or TB), if you still use the index method to optimize the query, due to the consumption of the index and the generation of a large number of index fragments, the query process will
The hash index is implemented based on the hash table. It is only valid for queries of all columns that precisely match the index. For each row of data, the storage engine calculates a hash code for all index columns, calculate the rows with
When the data volume is very large (the table capacity reaches GB or TB), if you still use the index method to optimize the query, due to the consumption of the index and the generation of a large number of index fragments, the query process will
Overview
The built-in replication function of Mysql is the basis for building large and high-performance applications. This distribution mechanism replicates data from a Mysql host to another Server Load balancer instance, and execute it again.
1. Benchmark Test and Performance Analysis
Benchmark Testing and performance analysis are two basic methods for identifying system bottlenecks:
The benchmark test is used to measure the overall performance of the system. This helps to determine the
Background: in actual use of MySQL, if the access volume is large, a large number of Locked processes may occur, but it is difficult to identify which SQL statements are causing problems, when many people encounter such problems, they mostly query
1. environment description SuSE11sp1x86_6443; MySQL5537blog address: http: bytes Test table order_line has 3.2 billion data records, the size is about 37G: NDSC02: datamysqlmysql3306 1. environment description
SuSE 11 sp1 x86_64 + MySQL 5.5.37
Blog:
Several good methods to optimize MySQL database performance 1. select the most suitable field attribute
MySQL can support access to large data volumes, but generally, the smaller the table in the database, the faster the query will be executed on
MYSQL Performance Tuning and architecture design-instance analysis of factors affecting MYSQL Performance
Requirement overview
A simple discussion zone system requires users, user groups, and group discussion areas.
Brief analysis
1) tables that
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.