You can get a lot of interesting information,with the queries "SHOW VARIABLES" and "SHOW STATUS":
http://www.mysql.com/doc/en/SHOW_VARIABLES.html
http://www.mysql.com/doc/en/SHOW_STATUS.html
The measure the time, you can use this function:
<?php
function GetMicrotime()
{
list($fUSec, $fSec) = explode(" ", microtime());
return ((float)$fUSec + (float)$fSec);
}
$fStart = GetMicrotime();
$ciDB->Query("SELECT SOMETHING BIG");
$fEnd = GetMicrotime();
echo "The query took " . round(($fEnd - $fStart), 2) . " seconds.";
?>