I\'m running a MySQL query via a command-line PHP script (prepared query using PDO on the mysqlnd driver). It\'s a simple query with a single left-join, returning 100 rows
PDO uses resources to manipulates row results. Par that with an interpreted language (PHP) and you will have script that takes longer to process than it does for MySQL to return your results.
NOTE: Using mysql_select_db() or mysqli_select_db() is much faster than PDO.
To learn more about faster PHP Queries, see: PHP: What's the fastest way to query MySQL? Because PDO is painfully slow