Interview questions: Talk about how to optimize MySQL database query, MySQL database
1. Optimize data type
There are several types of data in MySQL, and if you are a DBA, you are rigorously checking the data types according to the principles of optimization, but developers may choose what they think is the simplest sc
How to query slow SQL statements in MySQL
1. query logs
(1) enabling MySQL slow query in Windows
In Windows, the configuration file of MySQL is usually my. ini. find [mysqld] and add
The code is as follows:
Log-slow-queries
Interview questions: how to optimize MYSQL database queries and mysql databases. Interview questions: how to optimize MYSQL database queries. mysql database 1. how to optimize the data types in MySQL. if you are a DBA, you are waiting for an interview question based on the o
This article mainly introduces how to handle the faults caused by slow MySQL queries. slow queries are a convenient feature that we often use in mysql, slow query is very useful for queries with tracing problems. For more information about how to analyze the query performance of My
Index is the most important tool for improving the query speed. Of course there are other technologies available for use, but in general, the biggest performance difference is the correct use of indexes. In the MySQL mail list, people often ask for methods that make queries run faster. In most cases, we should doubt whether there are any indexes on the data table, and usually
Like most relational databases, log files are an important part of MySQL databases. MySQL has several different log files, such as error log files, binary logs, common logs, and slow query logs. These logs can help us locate the internal issue of mysqld
Like most relational databases, log files are an important part of MySQL
Analysis of MySQL Query Optimizer (1) 1 definition
The Mysql Query optimizer selects an appropriate execution path for the query statement. The code of the query optimizer is usually changed, which is not the same as that of the
This article mainly introduces the analysis on English letters and lowercase letters in MySQL. The author has conducted experiments from multiple perspectives. if you need a friend, refer to the mysql database for query, sometimes English letters are case-sensitive and sometimes not true. it is mainly determined by the character verification rules of
In-depth analysis of explain for MySQL Query optimization MySQLexplain
BitsCN.com
When analyzing query performance, it is also useful to consider the EXPLAIN keyword. The EXPLAIN keyword is generally placed before the SELECT query statement to describe how MySQL performs the
The MySQL Query optimization program [group chart] analyzes a selection row query to see if it can be optimized to make it run faster. This article will study how the query optimization program works. For more information, see "Getting Maximum Performance from MySQL" in
How to make MySQL Query case sensitive: bitsCN.com
1. you can set collation for a table or row to binary or case sensitive. In MySQL, the naming conventions for Column Collate are as follows:* _ Bin: binary case sensitive collation, that is, case sensitive.
* _ Cs: case sensitive collation, case sensitive
* _ Ci: case insensitive collation, case insensitive
###
[Slow query optimization] use MySQL subqueries with caution, especially when you see the DEPENDENTSUBQUERY tag bitsCN.com case study:
Preface:
I have repeatedly stressed the importance of explain in slow query optimization 1 and 2, but sometimes I cannot see how the explain results Guide optimization. at this time, I still need some help with other basic knowl
This article describes the basic query statement learning notes in MySQL, including how to use limit to limit the number of query results and merge query results. For more information, see
Learning notes for basic query statements in MyS
. In other words, the subquery is executed first, and then the main query is executed based on the results of the subquery.Keywords: the keywords used for subqueries mainly include in, not in, EXIST, not EXIST, =, Note: MySQL does not support SQL subqueries from 4.1 onwards. It is generally said that subqueries are less efficient than connection queries (because subqueries require at least two queries, or a
Group query uses groupby to group data. The objective is to query the grouped data. Selectcolumn, group_functionfromtable [wherecondation] [groupbyexpression] [havinggroup_condation] [order MySQL Query
Group query uses group by to group data. The objective is to
This article mainly introduces a specific case analysis of optimizing MySQL Query operations. it mainly adjusts the use of join fields. For more information, see
Problem Description
A user reports that the execution time of an SQL statement is too slow to be accepted. The SQL statement looks simple (the table name and field name are modified in the description ):SELECT count (*) FROM a JOIN B ON.'s '= B.'s
MySQL details (19) ---------- paging Query Optimization for massive data, mysql ----------
The detailed explanation of the paging, please see the http://blog.csdn.net/u011225629/article/details/46775947
View the code print 1 SELECT * FROM table order by id LIMIT, 10;The preceding SQL statement does not have any problems in principle or in practice. However, when
This article describes how MySQL uses temporary tables to accelerate queries. Share it with you for your reference. The specific analysis is as follows: using a MySQL temporary table can sometimes accelerate the query. The following describes how to use a MySQL temporary table to accelerate the
MySql official manual Study Notes 2-MySql fuzzy query and regular expression links: MySql official manual Study Notes 1-MySql easy to use http://www.bkjia.com/database/201210/159522.html MySQL provides standard SQL mode matching a
High-Performance MySql evolution (11): Optimization of common query statements bitsCN.com
Summarize the optimization methods of common query statements.1 COUNT
1. Functions of COUNT
· COUNT (table. filed) indicates the number of records for which this field is not null.
· COUNT (*) or COUNT (not nullable field) indicates the number of rows in the entire table.
If
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.