You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 12, 2024. It is now read-only.
Copy file name to clipboardexpand all lines: docs/concepts/cluster-configuration.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -44,7 +44,9 @@ To create a new [keyspace](/docs/sharding/keyspaces):
44
44
5. Enter the keyspace name. For example, if your existing unsharded keyspace is named `books`, you may create a sharded keyspace named `books-sharded`.
45
45
6. Select whether you want to keep it unsharded, or, if not, select the number of shards you to exist in this keyspace. In most cases, you will be adding a new sharded keyspace. Adding a new unsharded keyspace is not a common use case.
46
46
47
-
**Note**: The cost of adding this additional keyspace largely depends on the number of shards you choose, the cluster size, and if you'd like to add additional replicas.
47
+
{% callout type="note" %}
48
+
The cost of adding this additional keyspace largely depends on the number of shards you choose, the cluster size, and if you'd like to add additional replicas.
49
+
{% /callout %}
48
50
49
51
7. Choose the cluster sizes you would like to use for this keyspace. Keep in mind, if you are creating a sharded keyspace, this will spin up multiple clusters of the selected size. For example, if you are creating 4 shards and choose the `PS-80` cluster size, we will create 4 `PS-80`s, each with 1 primary and 2 replicas.
50
52
8. Select the number of _additional_ replicas, if any, that you'd like to add to each cluster. Each cluster comes with 2 replicas by default, so any number you choose will be in addition to those 2.
@@ -53,7 +55,9 @@ To create a new [keyspace](/docs/sharding/keyspaces):
53
55
54
56
## Modify the VSchema of a keyspace via cluster configuration tab
55
57
56
-
**Note**: You can modify the VSchema on your development branch either in the cluster configuration tab, using the [`ALTER VSCHEMA` command](/docs/sharding/vschema#modifying-vschema), or with the pscale CLI using [`pscale keyspace vschema update`](/docs/reference/keyspace).
58
+
{% callout type="note" %}
59
+
You can modify the VSchema on your development branch either in the cluster configuration tab, using the [`ALTER VSCHEMA` command](/docs/sharding/vschema#modifying-vschema), or with the pscale CLI using [`pscale keyspace vschema update`](/docs/reference/keyspace).
60
+
{% /callout %}
57
61
58
62
Once you have created your keyspace, you will see a new tab: **VSchema**. The VSchema contains information about how the keyspace is sharded, sequence tables, and other Vitess schema information. The VSchema tab allows you to configure the Vschema for your new keyspace or modify it for existing keyspaces.
Copy file name to clipboardexpand all lines: docs/sharding/overview.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,8 @@ When you're at the point where you've maxed out your vertical scaling efforts an
35
35
36
36
## How does our sharding process work?
37
37
38
-
When it comes time to shard your database, you'll work closely with our Technical Solutions team to identify the best [sharding scheme](https://vitess.io/docs/reference/features/sharding/#sharding-scheme) for your database.
38
+
When it comes time to shard your database, we recommend following our [sharding quickstart](/docs/sharding/sharding-quickstart) guide. You may also
39
+
contact our [Technical Solutions team](/contact) to identify the best [sharding scheme](https://vitess.io/docs/reference/features/sharding/#sharding-scheme) for your database.
39
40
40
41
PlanetScale uses an explicit sharding system.
41
42
This means that, if you are going to horizontally shard your data, we have to tell Vitess which sharding strategy to use for each sharded table.
Copy file name to clipboardexpand all lines: docs/sharding/sharding-quickstart.md
+3-2
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ CREATE TABLE user(
86
86
```sql
87
87
CREATETABLEexercise_log(
88
88
log_id BIGINT UNSIGNED AUTO_INCREMENT,
89
-
user_id BIGINT,
89
+
user_id BIGINT UNSIGNED,
90
90
reps SMALLINT,
91
91
created_at DATETIME,
92
92
edited_at DATETIME,
@@ -97,8 +97,9 @@ CREATE TABLE exercise_log(
97
97
);
98
98
```
99
99
100
-
However, we need to get rid of the `AUTO_INCREMENT`s in favor of [sequence tables](/docs/sharding/sequence-tables) in order to get this horizontally sharded.
100
+
However, we need to replace the `AUTO_INCREMENT`s in favor of [sequence tables](/docs/sharding/sequence-tables) in order to horizontally shard the tables.
101
101
To do this, we'll first create the tables in the sharded keyspace with the `AUTO_INCREMENT`s removed.
102
+
102
103
Connect to your PlanetScale database and run the following:
0 commit comments