Skip to content

support COALESCE PARTITION for hash partitioned table #15002

@tiancaiamao

Description

@tiancaiamao

Description

The 'ALTER TABLE ... COALESCE PARTITION' statement can adjust the partition count.

mysql> CREATE TABLE clients_lk (
    ->     id INT,
    ->     fname VARCHAR(30),
    ->     lname VARCHAR(30),
    ->     signed DATE
    -> )
    -> PARTITION BY LINEAR KEY(signed)
    -> PARTITIONS 12;
Query OK, 0 rows affected (0.03 sec)

mysql> ALTER TABLE clients_lk COALESCE PARTITION 4;
Query OK, 0 rows affected (0.06 sec)
Records: 0  Duplicates: 0  Warnings: 0

Consider #14999 and #15000 before taking this task, as ALTER TABLE ... COALESCE PARTITION is less frequent in practical use.

Score

9885

Mentor(s)

Contact the mentors: #tidb-challenge-program channel in TiDB Community Slack Workspace

Recommended Skills

  • Golang

Learning Materials

Metadata

Metadata

Assignees

No one assigned

    Labels

    component/tablepartitionThis issue is related to Table Partition of TiDB.feature/acceptedThis feature request is accepted by product managerssig/sql-infraSIG: SQL Infratype/feature-requestCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions