1. Query cache optimization for your queryShow variables like "%query_cache%"//Check whether the cache is turned onTo open a command:Set global query_cache_type = 1;Set global query_cache_size = 600000;2.EXPLAIN your SELECT queryUse the EXPLAIN
Explain can analyze the execution of the select statement, that is, the "Execution Plan" of MySQL.
Type Column
MySQL finds the required rows in the table. Including (from left to right, from worst to best): | All | index | range | ref | eq_ref |
How to add an index for MYSQL 1. add primary key (primary key index) www.2cto.com mysql> alter table 'table _ name' add primary key ('column ') 2. add unique (UNIQUE index) mysql> alter table 'table _ name' add unique ('column ') 3. add index
To learn about the MySQL database, MySQL auto-increment fields are one of the most basic parts. The following describes some common statements for MySQL auto-increment fields. I hope this will help you learn about MySQL auto-increment fields.
1.
Indexes are the main means to accelerate table content access, especially for queries involving connections to multiple tables. This is an important part of database optimization. We need to understand why indexes are needed, how indexes work, and
In mysql, OrderBy can be used in many usage scenarios. Previously, you can refer to the orderby usage in some manuals. However, this is the first section of this article, next we will introduce the specific usage of this line.
In mysql, Order By can
MysqlInnoDB row lock implementation method bitsCN.com
Mysql InnoDB row lock implementation method InnoDB row lock is implemented by locking the index items on the index. this is different from Oracle in MySQL, the latter is implemented by locking
Impact of type conversion on MySQL index selection bitsCN.com
I encountered several cases where MySQL did not use the expected index. after reading some documents, I found that the impact of MySQL type conversion on index selection is not small.
For
This article mainly describes how to accelerate the Dynamic web site of MySQL index analysis and optimization.
I. What is an index?
Indexes are used to quickly look for records with specific values, and all MySQL indexes are saved as B-trees. If
Use PHP + Sphinx to create an efficient intra-site search engine. why is sphtracing used? assume that you are currently running a forum with over 100 Forum data. many users have reported that the search speed of the forum is very slow, then you can
Use PHP + Sphinx to create an efficient intra-site search engine. why is sphtracing used? assume that you are currently running a forum with over 100 Forum data. many users have reported that the search speed of the forum is very slow, then you can
Using Php+sphinx to build efficient in-site search engines
1. Why Use Sphinx
Suppose you run a forum now, the Forum data has been more than 100W, many users reflect the forum search is very slow, then you can consider the use of Sphinx (of course,
System environment:os:centos6.4 64-bitmysql:5.1.63coreseek:4.1The installation and configuration process is as follows:
#当前路径[Root@e sphinx]# pwd/home/sphinx#安装依赖包[Root@e sphinx]# yum install make gcc g++ gcc-c++ libtool autoconf automake imake
Database environment
Dev: Development environment, development of read-write, can modify table structure. Developers can modify the table structure and can modify the data at will, but need to ensure that other development colleagues are
I. What is an index?Indexes are used to quickly look for records with specific values, and all MySQL indexes are saved as B-trees. If there is no index, MySQL must start scanning all records of the entire table from the first record until it finds a
An index is a specific sort of algorithm for a particular MySQL field, such as a two-tree algorithm and a hashing algorithm. MySQL default is the two fork tree algorithm BTREE.Explain optimized query detectionExplain can help developers analyze SQL
The Type field in the explain execution plan is divided into the following types:All INDEX RANGE REF eq_ref const,system NULLFrom left to right, performance from worst to bestType = all, full table scan, MySQL scan full table to find matching rows
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.