Link Search Menu Expand Document

MySqlConnectorBulkImportPseudoTableType


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

It is used by the following bulk operations.

Enum Values

NameDescription
AutoChooses between Physical and Memory based on row count (Physical at 5,000 rows or more). This is the default.
MemoryA TEMPORARY table, private to each session. Safe for concurrent/multi-connection workloads.
PhysicalAn ordinary heap table, shared by every session. Only safe for sequential (non-concurrent) workloads against the same target table.

Every value currently resolves to Physical at runtime, regardless of the value passed or the row count. Auto and Memory are kept in the enum so existing code doesn’t need to change once the session-isolated TEMPORARY table path is fully wired up. See Operations (MySqlConnector) for details.

Usability

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

using (var connection = new MySqlConnection(connectionString))
{
    var people = GetPeople(1000);
    var mergedRows = connection.BulkMerge(people,
        pseudoTableType: MySqlConnectorBulkImportPseudoTableType.Physical);
}