AuroraDbBulkImportPseudoTableType

An enumeration that is being used to define the type of staging (pseudo) table to be created during the bulk-import operations.

This enum defines the type of staging (pseudo) table created during bulk-import operations. It applies only to Aurora MySQL.

It is used by BulkInsert (only when identityBehavior is ReturnIdentity), BulkMerge, BulkUpdate, BulkDelete and BulkDeleteByKey.

Enum Values

Name Description
Auto Selects Physical when the entity/row count being bulk-written is 5,000 or more, otherwise selects Memory. This is the default.
Memory Backs the operation with a TEMPORARY table. Rows are session-private, isolating the execution from any concurrent executions on other connections.
Physical Backs the operation with an ordinary heap table. Rows are not session-isolated, so concurrent callers can see and interfere with each other’s staged rows, but it is faster and more efficient for large, sequential bulk operations.

As currently implemented, this argument has no effect: every bulk call resolves to Physical regardless of the value passed — Auto and Memory are accepted but not yet honored. The TEMPORARY-table code path for Memory exists and is correctly generated, but is not reachable through the public API yet.

Usability

Pass the value to the pseudoTableType argument of the target operation.

using (var connection = new AuroraDbConnection(connectionString))
{
    var people = GetPeople(1000);
    var insertedRows = connection.BulkInsert(people,
        identityBehavior: AuroraDbBulkImportIdentityBehavior.ReturnIdentity,
        pseudoTableType: AuroraDbBulkImportPseudoTableType.Physical);
}