     /// The database configuration
     public let configuration: Configuration
     
+    /// The last error message
+    var lastErrorMessage: String? { return String.fromCString(sqlite3_errmsg(sqliteConnection)) }
+    
+    private var columnInfosCache: [String: [ColumnInfo]] = [:]
+    private var updateStatementCache: [String: UpdateStatement] = [:]
+    private var selectStatementCache: [String: SelectStatement] = [:]
+    
     /// Clears the database schema cache.
     ///
     /// You may need to clear the cache if you modify the database schema
-    /// outside of a migration (see DatabaseMigrator).
+    /// outside of a database migration performed by DatabaseMigrator.
     public func clearSchemaCache() {
         preconditionValidQueue()
         columnInfosCache = [:]
-    }
-
-    /// The last error message
-    var lastErrorMessage: String? { return String.fromCString(sqlite3_errmsg(sqliteConnection)) }
-    
+        updateStatementCache = [:]
+        selectStatementCache = [:]
+    }
     /// Returns whether a table exists.
     ///
     /// - parameter tableName: A table name.

    /// - throws: A DatabaseError whenever SQLite could not parse the sql query.
    public func updateStatement(sql: String) throws -> UpdateStatement {
        return try UpdateStatement(database: self, sql: sql)
    }
    
    /// Executes one or several SQL statements, separated by semi-colons.

        return try SelectStatement(database: self, sql: sql)
    }
    
    func cachedSelectStatement(sql: String) throws -> SelectStatement {
        if let statement = selectStatementCache[sql] {
            return statement
        } else {
            let statement = try selectStatement(sql)
            selectStatementCache[sql] = statement
            return statement
        }
    }
    
    
    // =========================================================================
    // MARK: - Update Statements
