During the execution of transactional statements, the server will perform additional processing. When the server executes multiple transactions in parallel, in order to record them together, the concept of transaction cache needs to be introduced.
When using storm to process logs, we often encounter the efficiency problem of inserting MySQL concurrently. I checked some information online and made some notes.Change the table engine to MyISAM,
Modify the concurrent_insert = 2 of my. CNF. The
Generally, the Master/Slave Mechanism Based on LAN can meet the requirements of 'realtime' backup. If the latency is high, first confirm the following factors:1. network latency2. Master Load3. Slave LoadThe general practice is to use multiple slave
Set and enum data types are all string objects. Set can contain up to 64 elements, and any element in the set can be obtained. However, Enum can only obtain one Wood Element in the Set, which can contain a maximum of 65536 elements. That is to say,
The innodb Engine differs greatly from the MYISAM engine. In particular, its data storage format.
For the innodb data structure, we must first solve two conceptual problems: the shared tablespace and the exclusive tablespace.
What are shared and
Backup Data method:I. SQL statements.Locks tables tablename READ; // READ lockBefore trying to LOCK a table, lock tables is not TRANSACTION-safe. It implicitly commits all active transactions and starts a TRANSACTION implicitly (for example, start
The basic process of mysqld_safe script execution:1. Search for basedir and ledir.2. Search for datadir and my. cnf.3. Check my. cnf. For details about the options, see the annotations in the attachment.4. parse the groups [mysqld] and [mysqld_safe]
A large amount of data deletion will inevitably lead to discontinuous blank spaces in the data file. when inserting data, these blank spaces will be used.Different storage engines are organized in different ways.MyisamYou can use the following
Drop user deletes all user information, while delete only deletes the user table. Other information, such as the information in the db table, still exists.
If you create a user with the minimum permission after the delete operation, the user will
1. Create a table:
Copy codeThe Code is as follows: drop table if exists photo;
Create table photo (
Id int not null AUTO_INCREMENT primary key,
Name VARCHAR (100) COMMENT 'name ',
Photo blob COMMENT 'photo'
)
ENGINE = InnoDB
Default charset =
1. select the most suitable field attributeMySQL can support access to large data volumes, but generally, the smaller the table in the database, the faster the query will be executed on it. Therefore, when creating a table, we can set the field
On the surface of the database table, there is an index and error prevention mechanism. However, a simple query takes a long time. Web applications may run well in the development environment, but are equally bad in the product environment. If you
About 0.2 million of data insertion operations were encountered during work. After the program was compiled, it was found that the Operation timed out. The maximum PHP Execution time was modified to 600, or timed out. Check the number of data
I have read a lot of questions about mysql. sock on the Internet before, but I didn't pay attention to the significance of this issue until I encountered the same problem in my mysql. It's confusing ......
Copy codeThe Code is as follows: zhouqian @
Profiling is a very useful mysql performance analysis tool. Today, we will test the profiling function. Thanks to the blog post "love Rose:
The SQL Performance Analyzer of mysql is mainly used to display the usage of various resources during SQL
When I visited the Forum today, I found a seemingly simple problem, but it attracted wide attention:This is a very early interview question:A table contains an ID auto-incrementing primary key. After 17 records are inserted, records 15, 16, and 17
I installed a mysql on the virtual machine, modified its my. cof file, and found that this configuration file is powerful, but encountered a problem:
When setting character sets, set default-character-set = utf8 under [client], [mysql], and [mysqld]
Select * from table limit m, n where m Refers to the index at the beginning of the record, starting from 0, and n refers to taking n records starting from entry m.
Copy codeThe Code is as follows: mysql (root @ localhost: test)> select * from total;
When I interviewed mysqldba, I encountered a question:
Describes the implementation principle of the msyql replication mechanism. How can I restore the database node of the slave with inconsistent data without stopping the mysql master
1.
Convert the number of a character to a number. For example, convert '0' to 0, which can be directly implemented by addition.For example, sort d in the pony table and define d as varchar.
Select * from pony order by (d + 0)
2. when performing
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service