A few days ago, I saw a program written by a foreigner, I'm interested in using a lot of Limit keywords in mysql queries, because in my memory, the Limit keyword seems to be more used by programmers using MySQL databases to do query paging (which is
First scenario:Using recursive algorithms is also the most frequently used, most open source programs do the same, but generally use only four levels of classification. The database structure design of this algorithm is the simplest. Category A
Sql_mode= "", that is, forced not to set MySQL mode (such as no input detection, error prompts, syntax mode check, etc.) should improve performance, but the following problems:
If inappropriate data is inserted (error type or paranormal), MySQL sets
One, MySQL: index in B-Tree format saveThe memory storage engine can select either a hash or a btree index, and the hash index can only be used for = or equality comparisons.
1. Normal index: CREATE index on TableName (List of columns)
ALTER
Mysql> show global status;
Can list the MySQL server running various status values, in addition, query the MySQL server configuration information statement:
Mysql> Show variables;
One, slow query
Mysql> Show variables like '%slow% ';+ —————— + ——
#BEGIN CONFIG INFO
#DESCR: 4GB RAM, using only InnoDB, ACID, a small number of connections, large queue load
#TYPE: SYSTEM
#END CONFIG INFO
#
# This MySQL profile example for 4G memory
# Main Use InnoDB
#处理复杂队列并且连接数量较少的mysql服务器
#
# Copy this file
Chinese garbled problemwhen I first contact MySQL, first let me uncomfortable is the MySQL garbled problem, Baidu also has a lot of related solutions, but as a personal victim, I think it is necessary to post my voice:1. About MySQL's character set
Target, the developer said that there is a data inexplicably added, but do not know where to add, and the application function should not add such data, in order to find out the source, so I was ready to go to binlog inside, but Binlog have several
A deadlock occurs when multiple transactions hold and request locks on the same resource at the same time as a result of cyclic dependency. Deadlocks occur when a transaction attempts to lock a resource in a different order. Take the two
1, on the management node for backup.ndb_mgm> Start Backup nowaitNdb_mgm> Node 3:backup 4 started from Node 1Node 3:backup 4 started from Node 1 completedstartgcp:43010 stopgcp:43013#Records: 2138 #LogRecords: 0data:53068 bytes log:0 bytesndb_mgm>
This article describes the two-level linkage menu effect implemented by Php+mysql. Share to everyone for your reference, specific as follows:
Generation College Professional cascading pull-down menu test /*******************************
MySQL Open universal query Log general logafter MySQL opens the general log, all the query statements can be read in the main log file in a readable manner, but this will be very large log file, so the default is closed. Sometimes in order to check
MySQL needs to support emoji emoticons version requires greater than 5.5.3, and the character set needs to be set to the UTF8MB4 character set.
What's the difference between utf8mb4 and UTF8? The original MySQL UTF8 a character up to 3 bytes, while
1. View character Set related variables
Mysql> Show variables like ' character% ';
+ ———————— –+ ——————————-+
| Variable_name | Value |
+ ———————— –+ ——————————-+
| character_set_client | latin1
MySQL table alias (alias)SQL Table AliasIn SQL statements, you can specify an alias (alias) for the Table name and field (column) names, which are SQL standard syntax, and are supported by almost all database systems. specified by keyword as.Table
There is a character set translator between the MySQL client and the MySQL server.
Character_set_client =>GBK: The converter knows that the client sent the code in GBK format.
CHARACTER_SET_CONNECTION=>GBK: Converts data transferred from client
Union and join is the need to unite more than one table common related words, the specific concept I do not say, want to know online search on the line, because I also remember inaccurate.First of all, the difference: union the operation of two
Sometimes, you do not want the stored procedure to throw an error abort execution, but rather to return an error code. Mysql supports exception handling by defining Continue/exit exception handling HANDLER to capture Sqlwarning/not
Common functions for MySQL stored procedures
A. String classCHARSET (str)//return string character setCONCAT (string2 [,...])//connection stringINSTR (string, substring)//Returns the position that substring first appeared in string and does not
In MySQL, there are two ways to generate an ordered result set: one is using Filesort, and the other is scanning in indexed order. Sorting with an index is very fast, and you can use the same index to find and sort operations at the same time.
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