Recommended 10 commonly used clustering index sorting methods, welcome to download!

巴扎黑
Release: 2017-06-15 15:20:13
Original
1641 people have browsed it

Why should the mysiam engine be used when executing a lot of selects? Especially when there is an index, this chapter relies on a practical application and analyzes it. 1. Preface: I saw an interesting phenomenon on the Internet. A table with 1W data volume executes different orderby conditions, and the query time is very long. Is this a real problem in practical applications? ? why? 2. Analysis a). Situation description: 1. There is a primary key id and a joint index (id, ver); using the former for orderby query is slow, and using the latter for orderby query will be very fast; 2. The amount of data in each row is quite large 3. ID is the main index, and the field in the select query only has ID, so it is not covered by the index. You don’t need to use the physical disk to return the data. You can get the data you want on the index, but the query should be faster. But slower. Mysql-index coverage b). Analysis: It must not be using the mysiam engine. If so, the speed of query using these two indexes is almost the same, because the address of a physical row is stored in the index, and the actual amount of data occupied Not big. But if it is innodb, it is different. Its main index can be dragged down.

1. Mysql-clustered index slow sorting case analysis

Recommended 10 commonly used clustering index sorting methods, welcome to download!

Introduction: Why should the mysiam engine be used when executing a lot of selects? Especially when there is an index. This article relies on a practical application and analyzes it.

【Related Q&A recommendations】:

The above is the detailed content of Recommended 10 commonly used clustering index sorting methods, welcome to download!. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!