Mistakes Mysql in the use filesort

A misunderstanding literal errors

use filesort sort, literally an external sort.

Myth parrot

On Baidu more than we are not negative external sort that keyword and file it does not matter. Using a quick sort. But always felt impossible for so called filesort no reason, so check the next Quguan network.

Correct

The official explanation

Sure enough, I think that's only half are two positive solutions above all, use filesort are sorted in memory, but if the result set is too large to use an external memory will be used to sort. ( No matter what sort filesort are bottom with extra sorting, but faster than external memory sort sort that need to optimize sql friends ~ , here only explore filesort principle )

verification

Download Source mysql

Direct access github address https://github.com/mysql/mysql-server/ be downloaded or viewed directly

Quguan network can also be downloaded, and download mysql packages, not to say, just choose Operating System Source Code Select the final step in

View source

Initiate ~ ~ ~ ~ wave analysis by the Honorable Gangster (quietly tell you, I simply can not find the file in which to sort c ...)

~~~~~~

Original, reproduced please indicate the source of pirated reserved

Guess you like

Origin www.cnblogs.com/aeolian/p/11199648.html
Recommended