A comprehensive technology for mysql optimization, mainly including
A: Table Design rationalization (in line with 3NF)
B: add an appropriate index. [four types: general index, primary key index, unique index unique, and full-text index]
C: Table
Example
Insert ignore indicates that if the same record already exists, the current new data is ignored;
Insert ignore into table (name) select name from table2
Example
Insert into inserts data if any. If the primary key is not inserted
1.
We will use delete or truncate to clear table data when deleting general table data in mysql. However, if you encounter a large table, you will find this method a little difficult, the following example shows how to delete some data from a large
What you will see below is a comparison between the NUMERIC and DECIMAL data types. There are some differences between the numeric and decimal data types, mainly in terms of accuracy, for more details, see the following comparison with the instance.
First, ensure installation:1: install MySQL: sudo apt-get install mysql-server mysql-client 2: install MySQL development kit: sudo apt-get install libmysqlclient15-dev the header files that need to be used will appear in/usr/include/mysql/There are
After win8.1 is upgraded, MySQL55 is missing in the service list.
Mysql does not see maitenance, find the Installation File mysql-installer-community-5.6.12.0.msi to separately reinstall the mysql server, after reinstalling the configuration
Recently, the mysql innodb Storage engine was optimized to convert the shared tablespace into an independent tablespace. I didn't think so much at the beginning, so I had to promote it in a short time. So I want to optimize it and see how it works.
Linux
All operations in the console.
Import database:
Prerequisites: the database and data table must exist (already created)
(1) import the data table test_user. SQL TO THE test_user table of the test database.
[Root @ test ~] # Mysql-uroot-p
Case study time:
----------------------------------------------------------------------------------------------------------------------------
1 PRIMARY
Index (NULL) idx_gid 5 (NULL)
Using where
2
Index_subquery
This article will give you a summary of the ORA-01994: GRANT failure: the password file is missing or the problem has been disabled solution, here is the main permission problem, the following are some solutions for GRANT failure.
Errors that occur
There are several formatting functions in mysql, such as format, date_format, and TIME_FORMAT. Many of them do not understand them. I will give you a detailed example to illustrate the usage of these three functions.
1. FORMAT (X, D)
Format the
There are many errors reported during the mysql import stored procedure. Today I have summarized two error messages and solutions. I hope this tutorial will be helpful to all of you.
The following error is returned when I import a stored procedure
In the temporary mysql table, xxx is full. You only need to modify the tmp_table_size and max_heap_table_size parameters in my. ini.
Tmp_table_size if the temporary table in the memory exceeds this value, MySQL automatically converts it to the
This article will introduce you to some problems encountered during the jump and continuation of the MySQL Stored Procedure cursor operation. Let's take a look at the solutions to this problem.
Recently, this problem occurs. During the MySQL stored
The commands used for importing and exporting databases or data in mysql include the mysqldump and source commands, which have their own advantages and functions respectively, next I will introduce how to use mysqldump to export data and use source
Let's take a look at some problems and solutions for using the Mysql database union and order by priorities. I hope this article will be helpful to you.
In Mysql reference manual, the priorities of union and order by are not described.
The
A view is a stored SQL SELECT statement, or a virtual table (in MySQL, the view is used in front of the table ). The data can be data from one or several basic tables (or views. It can also be user-defined data. In fact, the view does not store data.
OverviewMDL means that once the DDL is blocked, all queries for the table will be suspended, including Select, but 5.6 has been improved, and 5.5 can be controlled by parameters.
If no MDL
Session 1: mysql> select version (); + ------------ + |
During this period, we have been using hadoop and pig to operate on some data. The new data volume generated every week is more than 1 million. For large volumes of data (more than 10 million), insert and update operations, if the insert operation
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