How MySQL does sorting with Order By
There are two filesort algorithms in MySQL for sorting and retriving select queries results. 1. Original Filesort Algorithm : This method uses only the ORDER BY columns. (prior to MySQL 4.1) 2. Modified Filesort Alforithm : This method uses ORDER BY columns and the columns which are used in query. (MySQL 4.1 and newer version)…