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

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

After MySQL deletes the data, the id starts from 1.

After MySQL deletes data, id starts from 1. Usage: create table test (id int unsigned not null primary key AUTO_INCREMENT, username VARCHAR (15) not null) AUTO_INCREMENT = 100; www.2cto.com is used in database applications. We often use unique

Mysql trigger new old

Mysql trigger new old details mysql trigger new old: www.2cto.com "NEW. column_name "or" OLD. column_name ". in this way, it is technically processed (NEW | OLD. column_name) the New and Old column names belong to the created transition variable

Float and decimal types in MySQL

The float and decimal float and double types in MySQL are prone to errors. When the precision requirements are relatively high, we recommend that you use decimal for storage. decimal is stored in mysql memory as strings, it is used to define data

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 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 --

Optimize shell scripts for Mysql Data Tables

Due to the large amount of data in the company's database, we regularly optimize the data tables in the company's mysql database (the optimize description is as follows). There are more than 300 data tables in the database, manual operations are

How to insert int null values in mysql

The best way to deal with the insertion of int null values in mysql is to: www.2cto.com. in this way, the null value is not allowed to be inserted as 0. Although it is necessary to judge when it is used up, there will be no problems. Other methods

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)

MySQL database lock mechanism

The MySQL database lock mechanism is called a lock. To ensure data consistency, it is a rule that allows concurrent access to shared resources to become orderly. Different MySQL storage engines have different lock mechanisms or lock implementations.

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/sqlserver where in parameter passing

Mysql/sqlserver where in parameter passing problem parameter: @ p0 = 1, 2, 3, 4 1. the common query is as follows: select * from table_name t where t. field1in (1, 2, 3, 4 ,...); select * from table_name t where t. field1in (@ p0); the final SQL

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

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

Mysql5.6.10 slow query settings slow-query-log

Mysql5.6.10 about the slow query settings slow-query-log two days ago, I just upgraded the development environment to 2008R2, so I want to try a 64-bit database of 5.6.10, it is the win32x64 version officially downloaded from mysql, with a total of

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

Differences between mysql status and variables

The difference between mysql status and variables: First, you can use the following two commands to view the corresponding mysql system parameter show status like '% abc %'; show variables like '% abc % '; however, many people do not understand the

Mysql update Performance Data

The mysql update performance data shows that the mysql performance of the program is poor. Let's take a look at the actual situation on the Internet. After a test, test data (not strict data, perform other computer operations during the test): The

Total Pages: 3233 1 .... 2828 2829 2830 2831 2832 .... 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.