Use mysqldumpslow to analyze and execute slow SQL statements

Using mysqldumpslow to analyze and execute slow SQL statement mysqldumpslow-s c-t 10/var/log/mysql/mysql-slow.log www.2cto.com MySQL database has a function that can be recorded in the form of logs to run Ratio slow SQL statement, this function is

Improved efficiency of using indexes for Mysql instances

The efficiency of using indexes in Mysql for instance testing increases the efficiency of DATABASE creation: [SQL] create database 'SQL _ learn_db'; www.2cto.com creates a Table: [SQL] Create Table: create table 'persons '('id' int (11) not null

Considerations and advantages of using Mysql Merge tables

Considerations and advantages of using Mysql Merge tables in Mysql databases, Mysql Merge tables are somewhat similar to views. Next let's take a look at the advantages of Mysql Merge tables. Advantages of Mysql Merge table: www.2cto.com A: Separate

How to Implement daily automatic mysql database backup in linux

In linux, how does one implement daily automatic backup of mysql Databases and create a backup Folder: mkdir mysql_data_bak script file: touch autobackupmysql. sh www.2cto.com open the file vi autobackupmysql. sh adds the following content to the

Note when trigger exists in mysqldump

In mysqldump, when a trigger is used to convert a myisam table to innodb, the schema is first exported and then only data is exported. For example: www.2cto.com mysqldump -- no-data databasename> schema. SQL output data: mysqldump -- no-create-info

Mysql remote client connection failure

The remote mysql client cannot be connected. By default, the installed mysql cannot be accessed remotely, mainly due to the following two reasons: www.2cto.com 1. the mysqld service does not monitor IP addresses that can be remotely accessed.

Cache of MyISAM table

A friend of www.2cto.com asked a question today. The original Article is: mysql5.1, MyISAM table, select count (*) as total FROM m_bff WHERE from_uid = '000000' AND isdeleted = 0. From_uid has an index. The speed of executing this sentence for the

MySQL query analysis and optimization

MySQL query and Analysis and Optimization Show www.2cto.com show status -- display status information (Extended show status like 'xxx') show variables -- display system variables (Extended show variables like 'xxx ') show engine innodb status --

MySQL YEARWEEK function and query data of this week

MySQL YEARWEEK function and query data of this weekMySQL YEARWEEK is a function used to obtain the year and week number. The function form is YEARWEEK (date [, mode]).For example, SundayWww.2cto.comSelect yearweek ('2017-3-14 ') returns 11Select

Basic functions of MySQL table partitioning

CREATE a partition TABLE www.2cto.com create table 'table name' ('equipmentid' char (17) not null, 'bubuteid' char (4) not null, 'value' varchar (20) not null, 'collecttime' datetime not null) ENGINE = InnoDB (applicable to most engines and can be

Random query of databases

SELECT * FROM 'table' WHERE id> = (SELECT floor (RAND () * (select max (id) FROM 'table '))) order by id LIMIT 1; finally, complete the statement and add the MIN (id) judgment. At the beginning of the test, because I did not add the MIN (id)

Parsing backup parameters of innobackupex

Innobackupex's backup Parameter Parsing A. Generally, innobackupex is directly used for data backup because it can back up InnoDB and MyISAM engine tables at the same time. Note that the datadir parameter in my. cnf must be specified. xtrabackup_55

Mysql on cascade

Description of the foreign key constraint of Mysql on cascade for the sub-table: if the candidate key cannot be found in the parent table, the meaning of the foreign key constraint of insert/update on the sub-table to the parent table is not allowed:

Mysql Stored Procedure experiences

Mysql Stored Procedure experiencesQuestion: What is the significance of the mysql stored procedure?The stored procedure is compiled only when it is created. You do not need to re-compile the stored procedure every time you execute it. Generally, the

Innodb Index concept

The innodb index concept summarizes the index concepts of innodb. For more information, see innodb index classification: clustered index (clustered index) 1. Create a clustered index based on the primary key when a primary key is available. 2) if

Batch Update: obtains the values of the associated fields from another table to Update the joinCount value of the current table.

Batch Update: obtains the values of the associated fields from another table to UPDATE the joinCount value of the current table. Update EventGroup g SET joinCount = (SELECT B. counts FROM (SELECT eventGroupId, SUM (1) AS counts FROM EventGroupMember

Database Configuration Optimization

The storage engine for database configuration optimization is mainly innodb, 2 GB memory is planned for Mysql to run the configuration file. Java code skip-external-locking key_buffer_size = 16 M bytes = 1 M table_open_cache = 512 sort_buffer_size =

Connection between circular variables and characters in Stored Procedures of common tables to be merged

General table merging Stored PROCEDURE circular variables and character connection Java code mysql> DELIMITER $ mysql> drop PROCEDURE sp_test_switch $ Query OK, 0 rows affected (0.01 sec) mysql> create procedure sp_test_switch ()-> BEGIN-> declare a

How to smoothly "restart" mysql

How to smoothly "restart" mysql note that the restart in the title is a mysql server in the production environment with quotation marks. Generally, it is necessary to avoid restarting as much as possible, but it is time-consuming to face the slow

Mysql master slave

Mysql master slave yum uninstall selinux yum remove selinux *-y involved in the software license mysql-5.1.40.tar.gz put the above software package under/software/mysql Unzip a unzip, install mysqltar zxvf mysql-5.1.40.tar.gzcd. /configure -- prefix

Total Pages: 3233 1 .... 2814 2815 2816 2817 2818 .... 3233 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.