 includes/database/schema.inc |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git includes/database/schema.inc includes/database/schema.inc
index 93f48dd..1c2785d 100644
--- includes/database/schema.inc
+++ includes/database/schema.inc
@@ -554,12 +554,16 @@ abstract class DatabaseSchema implements QueryPlaceholderInterface {
    *   If the specified table already exists.
    */
   public function createTable($name, $table) {
-    if ($this->tableExists($name)) {
-      throw new DatabaseSchemaObjectExistsException(t('Table %name already exists.', array('%name' => $name)));
+    try {
+      // Try to create the table and catch a possible exception in case the
+      // table already exists because tableExists() is very slow.
+      $statements = $this->createTableSql($name, $table);
+      foreach ($statements as $statement) {
+        $this->connection->query($statement);
+      }
     }
-  	$statements = $this->createTableSql($name, $table);
-    foreach ($statements as $statement) {
-    	$this->connection->query($statement);
+    catch (PDOException $e) {
+      throw new DatabaseSchemaObjectExistsException(t('Failed to create table %name. Exception thrown: %exception.', array('%name' => $name, '%exception' => $e->getMessage())));
     }
   }
 
