1, where the query conditions in the sentence is not equal to the number (where column!= ...) ), MySQL will not be able to use the index
2. Similarly, if a function is used in the query condition of the WHERE clause (for example, where day (column) =
View version Information
#1使用命令行模式进入mysql会看到最开始的提示符
Your MySQL Connection ID is 3
Server version:5.1.69 Source Distribution
#2命令行中使用status可以看到
Copy Code code as follows:
mysql> status;
--------------
MySQL Ver 14.14 distrib 5
Creating triggersCreate a trigger with only one execution statement
Copy Code code as follows:
CREATE TRIGGER Trigger Name before| After Trigger event
On table name for each ROW EXECUTE statement
Where the trigger name
The data is very important, this point with toes to know, in order to ensure data security, so the need to regularly backup data
Let's write a few notes about data backup and restore
Data backup
Backing up a database using the mysqldump command
Today from Windows to export a SQL execution file, and then poured into the unbutn, the results appear garbled, toss 7-8 minutes,
Resolution method
When you export the MySQL SQL execution file, specify the encoding format:
Copy Code code as
Background
A business database load alarm Abnormal, CPU usr reached 30-40, high. Use the tools to view the SQL that the database is executing, most of which are:
Copy Code code as follows:
SELECT ID, cu_id, name, info, Biz_type,
A preface
The previous article describes the 5.5/5.6 version of the MySQL semi sync fundamentals and configuration, with the release of MySQL 5.7, the new version of MySQL fixes some bugs in semi sync and enhances functionality.
Support the
Interview MYSQLDBA encountered a problem:
Describes the implementation principle of MSYQL replication mechanism, how to recover data inconsistent slave database nodes without losing the MySQL main library?
MySQL Replication (replication) is an
The SQL Select command is used to fetch data from the MySQL database. You can use this command at the mysql> prompt or using scripts such as PHP.Syntax:
The following is the syntax of the generic SQL SELECT command to extract data from the MySQL
I. Basic CONCEPTSThe mysql5.1 version begins to introduce the event concept. Event is both a "time trigger", unlike triggers event triggers, the event is similar to the Linux crontab scheduled task for TIME triggers. Triggers the associated SQL
You can use the IN clause instead of the combined "greater than equals and less than equals" condition.
The EMPLOYEE_TBL table to understand the BETWEEN clause has the following records:
Mysql> SELECT * from EMPLOYEE_TBL;
+------+------+----
We know that the InnoDB data page is 16K, and is a hard rule, the system does not change the way, I hope that in the future, MySQL can also support the size of a variety of data pages.But in practical applications sometimes the 16K is a bit large,
Usually, we will use the order by LIMIT start, offset to do the paging query. For example, the following SQL:
SELECT * from ' T1 ' WHERE ftype=1 the ORDER by ID DESC LIMIT 100, 10;
Or, like the following paged SQL without any
DBAs or developers who have used Oracle or other relational databases have the experience of thinking that the database has been optimized for the subquery, that it is a good choice to drive the execution of the table, and then porting that
When using the socket for the development of the network program, most of the cases will encounter the sending and receiving of characters, then if the string sent to the default way to deal with, you will generally get a bunch of garbled.
Because
MySQL's character set has more than one level, in the MySQL store Chinese, if the character set can not be correct, it is easy to appear garbled data. Today, there's a user who feeds him. Data in the database 1 o'clock in the afternoon began to
Problem description
One user reflects the first line one SQL statement execution time is too slow to accept. The SQL statement looks simple (the table name and field name are modified in the description):SELECT Count (*) from a JOIN b in a. ' s ' =
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