-
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][Colocation] Create flow #3033
Labels
Milestone
Comments
Zhongweizhao
pushed a commit
that referenced
this issue
Dec 21, 2019
Summary: Expand grammar for create colocated db/table ``` CREATE DATABASE ... WITH colocated = true | false CREATE TABLE ... WITH (colocated = true | false) ``` Creating a colocated database will create a dummy table and a tablet. Every table in the database will share this tablet. Creating a table in a colocated database will make this table colocated by default. User can specify colocated = false to opt out using the colocated tablet Next step is drop flow and truncate flow. Test Plan: `ybd --java-test org.yb.pgsql.TestPgRegressFeature` `ybd --cxx-test pgwrapper_pg_libpq-test --gtest_filter PgLibPqTest.TabletColocation` `ybd --cxx-test create-table-itest --gtest_filter CreateTableITest.TabletColocationRemoteBootstrapTest` Reviewers: neha, mihnea, hector, jason Reviewed By: hector, jason Subscribers: bogdan Differential Revision: https://phabricator.dev.yugabyte.com/D7608
When would a Yugabyte DB user want to colocate versus distribute a table? |
Hi @ben-pr-p , this page has information on when it'll be suitable to use colocated tables (Motivation section at the beginning): https://github.com/yugabyte/yugabyte-db/blob/master/architecture/design/ysql-colocated-tables.md In a gist, it'll a good choice for following scenarios:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Jira Link: [DB-416](https://yugabyte.atlassian.net/browse/DB-416)
Support
CREATE DATABASE WITH colocation=true
. This should create 1 tablet for the entire DB. All tables created within that database should use the same tablet.The text was updated successfully, but these errors were encountered: