A few thoughts on the database side of things:
1. The moodle/course/enrol.php script which runs when the enrol button is clicked performs a number of queries on the mysql database. Check the series of mdl_course tables in the moodle database to see if any need repairing. Try running "#mysqlcheck -u moodleuser -p --auto-repair moodle" (backup the database first before doing this).
2. If your tables are fine, then look into the query_cache and other mysql tuning variables to improve performance. Search this forum for more info, but this thread is a start.
Hope this helps!