Skip to content

Support for Multithreaded Execution #347

@luisggc

Description

@luisggc

Description:

Currently, schemachange executes migration scripts sequentially and as a single process, which can become time-consuming when applying complex schema operations or working with large datasets.

Use case / Motivation:

  • In large enterprise environments, schema deployments may involve overhead when applying numerous migrations across large tables.
  • Supporting multithreading or batched parallel execution in schemachange could greatly reduce execution time for large-scale deployments, especially when multiple large tables or changes are involved.

Proposed solution:

  • Add a configuration option or CLI flag (e.g., --threads N) to enable parallel execution:

Benefits:

  • Reduced runtime for long-running migrations.
  • Better utilization of CPU and database concurrency.
  • Scalable for big migrations.

Potential risks & considerations:

  • Increased concurrency stress on Snowflake warehouses. But we can have --threads None by default (current behavior).
  • User experience/configuration complexity.

I can work in this feature in case you don't have plans for It.

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