Skip to content

Split INSERT statements by byte size on export #2533

Description

@datlechin

Problem

The SQL export batches by row count: 1, 100, 500 or 1,000. Row count is a poor stand-in for statement size. A table of wide rows blows past the server's max_allowed_packet at 500 rows, and a table of narrow ones wastes the round trips at the same setting.

Proposed solution

  • A byte-size limit beside the row count, defaulting to something under a common max_allowed_packet.
  • Close the statement at whichever limit is reached first.
  • Show the resulting largest statement size in the export summary, so the setting can be judged.

Alternatives considered

Guess a row count low enough that nothing breaks.

Related database type

MySQL / MariaDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions