"Maintenance and optimisation of the work"① Maintaining data dictionaries② Maintaining Indexes③ Maintaining table structure④ horizontal split or vertical splitting of a table at the appropriate time"Maintain Data dictionary"A data dictionary is
First make sure that you have a MySQL-installed development packageUnder Ubuntu do the following command installation, other distributions please check it yourselfInstall Libmysqlclient-devThe sample code is as follows:#include
MySQL maximum number of connections by default is only 100, when users access to a database with the site or forum, will cause the MySQL service CPU usage increases, and can not provide services.[[Email protected] ~] #vim/etc/my.cnfLocate the
Logical backups are typically used for data migrations or data volumes, and logical backups are backed up by data exports.If you need to export all databases, the command is as follows:Mysqldump-uroot-p--single-transaction-a>all.sqlIf you want to
First, use the MySQL built-in command mysqldumpUsage:mysqldump [OPTIONS] database [tables]mysqldump [Options]--databases [options] DB1 [DB2 DB3 ...]mysqldump [Options]--all-databases [options]You can see that you can back up all the databases, the
Now with the development of the Internet, the magnitude of the data is also exponential growth, from GB to TB to PB. The operation of the data is also more difficult, the traditional relational database can not meet the needs of fast query and
(1) SQL Basic Query (2) MySQL Supported Data types Summary (3) MySQL operator (4) Common functions in MySQL (5) MySQL common storage engine (6) Character set in MySQL (7) MySQL index design and use (8) MySQL view (9) Stored procedures in MySQL and
Originally used in Java read file processing format after the database, run, found that the efficiency is too low, 4G text, more than 40 million lines, estimated to take about 30 days to complete processing.Data format:Each line, XXXX | | | XXXXXXX |
exists on the appearance with loop-by-article query, each query will look at the exists conditional statement, when the conditional statement in exists can return the record row (regardless of the number of record lines, as long as can return), the
Title: MySQL Database delete duplicate dataBecause it is MySQL, other data crying commands are not available in MySQL. Don't assume that SQL scripts are useddelete from Table1where field1 in ( select field1 from table1 group by field1 having
First look at the example:1, delimiter $$2. Drop procedure if exists ' test_procedure ' $$3. CREATE procedure test_procedure (in puser_id varchar ($), in pitem_id varchar ($), out result INT)4. Begin5. Select id into result from train_tbl where user_
1.mysql is an open-source relational database management system.2.mysql Login/exit: MySQL parameter: mysql-u root-p-p3306-h127.0.0.13.mysql Landing some parameters meaning:-u: User name,-P: User password,-P: Server port number,-H: Server address-D:
There are two main ways to backup MySQL:
Text Format backup:
Command: mysqldumpDump Files: Dump fileMain content: Database structure and data (create Talbe/insert)
Binary backup: This type of backup is done by copying files directly.
Reference: http://www.cnblogs.com/villion/archive/2009/07/23/1893765.html#3031899MySQL optimization can mainly consider the following four aspects:1. Database design:This is from the big aspect, the architecture aspect to design the database,
Mysql Date and Time Type
Current_time display current time now () display current date and time type YEAR 1 byte 1901 ~ 2155 zero value 0000 DATE 4 byte 1000-01-01 ~ 9999-12-31 0 value 0000: 00: 00 TIME 3 bytes-838: 59: 59 ~ 838: 59: 59 zero value 0
MySQL inserts fields with the same value as the auto-increment primary key and ensures data accuracy at high concurrency.
Scenario: Table t2 contains an auto-incrementing primary key id and field v. When a record is inserted, the values of v and id
Mysql study note 5 (trigger)
Trigger is one of mysql database objects. This object is very similar to functions in programming languages and must be declared and executed. However, trigger execution is not called by a program, it is not manually
How to uninstall mysql in linux1. Check whether mysql is installed before.
Run the: yum remove mysql * command to uninstall mysql and related components.
Command: rpm-qa | grep-I mysqlAs shown in:
Note:MySQL-client-5.5.25a-1.rhel5MySQL-server-5.5.25
A mysql query ProblemYesterday I wrote a complicated SQL statement. The following figure is shown:The required data now obtains the id and name fields from the product table, the quantity and totalMoney fields from buy_contract_Item and
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