I get my array of data via MySQL PDO:
"select * from table"
Is it faster to order using function within query such as
"select * from table order by key"
Do I sacrifice a lot of efficiency by using a PHP usort or any other array sort compared to a straight mysql order query?
$prepare=$database->prepare("select * from table");
$prepare->execute();
$fetch=$prepare->fetchall(PDO::FETCH_ASSOC);
usort($fetch, ...)