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

Bump down partition locality from city to region #4

Closed
ericharmeling opened this issue Apr 9, 2020 · 0 comments · Fixed by #27
Closed

Bump down partition locality from city to region #4

ericharmeling opened this issue Apr 9, 2020 · 0 comments · Fixed by #27
Assignees

Comments

@ericharmeling
Copy link
Contributor

We currently partition on the city column, which adds an unnecessary level of complexity to partitioning statements.

To simplify this, we should:

  • Add a new region column to each table in the database.
    e.g., "region STRING"
  • Add a CHECK constraint on the region column.
    e.g., "CONSTRAINT check_region CHECK (region IN ('us-west','us-central','us-east','europe-west'))
  • Partition on the new region column.
    e.g., "PARTITION BY LIST (region) ( PARTITION us_west VALUES in (us-west), etc
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

Successfully merging a pull request may close this issue.

1 participant