Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend alter table query templates with enable auto split #1800

Open
antonkovalenko opened this issue Dec 30, 2024 · 1 comment
Open

Extend alter table query templates with enable auto split #1800

antonkovalenko opened this issue Dec 30, 2024 · 1 comment

Comments

@antonkovalenko
Copy link
Member

Every time users need to enable auto partitioning by load we have to search required queries on the internets.

Let's introduce second level under alter table and add two options:

  • Rename, Manage columns -> this menu item fills the editor with current query template, available under alter table command
  • Managed auto partitioning -> this one fills the editor with the query template written below.

Query template for manage partitioning


-- documentation about partitioning https://ydb.tech/docs/en/concepts/datamodel/table#partitioning

ALTER TABLE `category` SET 
(
    AUTO_PARTITIONING_BY_LOAD = ENABLED, -- If a partition consumes more than 50% of the CPU for a few dozens of seconds, it is enqueued for splitting.
    AUTO_PARTITIONING_BY_SIZE = ENABLED, --  If a partition size exceeds the value specified by the AUTO_PARTITIONING_PARTITION_SIZE_MB  parameter, it is enqueued for splitting.
    AUTO_PARTITIONING_PARTITION_SIZE_MB = 2048,
    AUTO_PARTITIONING_MIN_PARTITIONS_COUNT = 10, -- Partitions are merged only if their actual number exceeds the value specified by this parameter.
    AUTO_PARTITIONING_MAX_PARTITIONS_COUNT = 100 -- Partitions are split only if their number doesn't exceed the value specified by this parameter.
)
@antonkovalenko
Copy link
Member Author

Should be considered a part of the epic
#911

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant