avoid one request SQL with an order by when it's not required