This was really just copied from a post made by Jan and edited slightly for clarity.
--------------------------------------------------------------------------------------
If you have a lot of images in your database, the random category image and random image are very expensive database queries because of "RAND()" in the ORDER BY clause.
Open includes/constants.php and try changing
define('SHOW_RANDOM_CAT_IMAGE', 1);
to
define('SHOW_RANDOM_CAT_IMAGE', 0);
This disables the category related random image.
If this does not help, change
define('SHOW_RANDOM_IMAGE', 1);
to
define('SHOW_RANDOM_IMAGE', 0);
This will disable the random image completely.