A Brief Introduction to MySQL's B-tree index and INDEX OPTIMIZATION, and a brief introduction to mysql
MySQL MyISAM and InnoDB engines use B + tree indexes by default ("BTREE" is displayed during queries). This article discusses two issues:
Why
In MySQL, an index is a data structure that the storage engine uses to quickly find a target record. Common index types include B-tree indexes, hash indexes, spatial indexes (R-tree), full-text indexes, and so on.Indexes are implemented at the
Table4.1. InnoDB Storage Engine Table typeInnoDB tables are similar to Oracle's IoT tables (indexed clustered Tables-indexorganized table), each table in the InnoDB table has a primary key, and if a defined primary key is not displayed when the
Recommended settings:
For a single running web server, we recommend that you add:
Skip-locking
Skip-name-resolve
Skip-networking
Use "localhost" when connecting to the database in PHP. In this way, the mysql client library will overwrite and try to
The primary key task is to help MySQL determine the location of a specific data record in the data table as quickly as possible. The primary key must meet the following two conditions:
1. The primary key must be unique. The primary key fields in
Multi-version concurrency control
Most of MySQL's transactional storage engines do not implement simple row-level locks. Based on the consideration of improving concurrency performance, they generally implement multi-version concurrency control at
1. Download the installation file from the Internet (here I download a MySQL binary distribution)Http://dev.mysql.com/downloads/index.html
2. Upload the file to the host through securecrtCopy mysql-3.23.58-pc-linux-i686.tar to C:/program
What is SphinxSphinx is a full-text search engine released under GPLv2, commercial authorization (for example, embedded in other programs) needs to contact us (Sphinxsearch.com) for commercial authorization. Generally, Sphinx is an independent
No details. no views of mysql have never been used in normal work, so I have not paid attention to it, recently, when configuring sphinx full-text search, because it does not support a single index to index multiple tables, it needs to index through
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.