If you have noticed there is an exclamatory sign (!) after the post title, let me tell you I have deliberately placed it to express my surprise on the whole thing which I’m going to share. I have been working with MySQL since early 2005, if I remember correctly it was version 4.1 which for the first time supported Sub Queries. I was a pure MySQL newbie back then and did not have any idea about how good or bad MySQL was. Honestly I switched from Microsoft Technologies to Open Source Technologies because my employer decided to switch to Open Source to avoid license costs, for obvious reasons I was skeptical about Free and Open Source MySQL and though very highly of MSSQL & MMC Console Microsoft offered! Since then till I faced the MySQL ORDER BY issue in Cloud I have used MySQL ORDER BY to solve all kinds of ranking problems, though I always knew MySQL sorting algorithm is not a great one, inside it uses qsort (quicksort) algorithm but if use the ORDER BY on a indexed field / key then it won’t cause much of an optimization issue. [Read more…]