Comments - Why is ORDER BY in a FROM Subquery Ignored?
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.
an 'easy' workaround to this, is:
this cause the optimizer to create a temporary table, and use filesort to order the query
the limit number is a 64bit unsigned -1 (2^64-1), this is a big number and can work with 99.999% of queries i know
@rspadim : Thank you for the workaround but on my biggest table, the time of execution increased since I tried. Do you have another idea ?
Higher execution time is expected if you force an ORDER BY on your biggest table.