-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[YSQL] Support for specifying split points for range-based partitioning #1486
Labels
area/ysql
Yugabyte SQL (YSQL)
Comments
georgeklees
added a commit
that referenced
this issue
Aug 16, 2019
…um_tablets splitting Summary: Extend the Postgres grammar for `CREATE TABLE` to allow specifying tablet split options: either a number of tablets or (for range partitioning) split points in the key domain. In this diff, split points are parsed but not implemented on the YugaByte side. The number of tablets specifier is passed on to the YugaByte side, so that feature works. Test Plan: * Perform a `CREATE TABLE ... SPLIT (INTO num_tablets TABLETS)` command, and ensure afterwards that it succeeds and generates the specified number of tablets in the YugaByte data directory. * Validate that `TestPgRegressPgMisc` (which has been updated to test the `SPLIT` statement parsing) passes Reviewers: mihnea, neha Reviewed By: neha Subscribers: yql Differential Revision: https://phabricator.dev.yugabyte.com/D7064
ndeodhar
added a commit
that referenced
this issue
Apr 26, 2020
…ble creation Summary: This diff adds support to pre-split range tables using `SPLIT AT VALUES` clause in `CREATE TABLE`. What's included: 1. SPLIT AT clause in CREATE TABLE. This is guarded by beta flag. 2. Push down of equality, range conditions for full as well as partially set PK. 3. Partition uses dockey encoding for range tables. What's pending: 1. IN clause push down. Current version will scan all tablets for IN clause. 2. SPLIT AT clause in CREATE INDEX statement. Example usage: ``` CREATE TABLE tbl( a int, b int, primary key(a asc, b desc) ) SPLIT AT VALUES((100), (200), (200, 5)); ``` Test Plan: Jenkins Added libpq and Java tests Reviewers: jason, mikhail, mihnea Reviewed By: mihnea Subscribers: yql, sudheer, bogdan Differential Revision: https://phabricator.dev.yugabyte.com/D8283
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After #1134, we can create range-partitioned tables (instead of hash-partitioned).
For instance, by explicitly setting the
ASC
column order for the first column:In that case, it can be useful for users to explicitly set split-points to pre-split such tables.
For instance, we could add an additional (optional) clause to create table/index statements along the lines of:
The text was updated successfully, but these errors were encountered: