Skip to content

Commit

Permalink
Add note to geo-partitioning about excluding ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
jseldess committed Jan 7, 2019
1 parent 4771237 commit e025cf6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion v2.1/training/geo-partitioning.md
Expand Up @@ -395,7 +395,7 @@ To check this, run the `SHOW EXPERIMENTAL_RANGES` statement on the `vehicles` an
{% include copy-clipboard.html %}
~~~ sql
> SELECT * FROM [SHOW EXPERIMENTAL_RANGES FROM TABLE vehicles] \
WHERE "start_key" IS NOT NULL AND "start_key" NOT LIKE '%Prefix%';
WHERE "start_key" NOT LIKE '%Prefix%';
~~~

~~~
Expand All @@ -410,6 +410,10 @@ WHERE "start_key" IS NOT NULL AND "start_key" NOT LIKE '%Prefix%';
(6 rows)
~~~

{{site.data.alerts.callout_info}}
The `WHERE` clause in this query excludes the empty ranges between the city ranges. These empty ranges use the default replication zone configuration, not the zone configuration you set for the cities.
{{site.data.alerts.end}}

For added clarity, here's a key showing how nodes map to datacenters and cities:

Node IDs | Datacenter | Cities
Expand Down
6 changes: 5 additions & 1 deletion v2.2/training/geo-partitioning.md
Expand Up @@ -396,7 +396,7 @@ To check this, run the `SHOW EXPERIMENTAL_RANGES` statement on the `vehicles` an
{% include copy-clipboard.html %}
~~~ sql
> SELECT * FROM [SHOW EXPERIMENTAL_RANGES FROM TABLE vehicles] \
WHERE "start_key" IS NOT NULL AND "start_key" NOT LIKE '%Prefix%';
WHERE "start_key" NOT LIKE '%Prefix%';
~~~

~~~
Expand All @@ -411,6 +411,10 @@ WHERE "start_key" IS NOT NULL AND "start_key" NOT LIKE '%Prefix%';
(6 rows)
~~~

{{site.data.alerts.callout_info}}
The `WHERE` clause in this query excludes the empty ranges between the city ranges. These empty ranges use the default replication zone configuration, not the zone configuration you set for the cities.
{{site.data.alerts.end}}

For added clarity, here's a key showing how nodes map to datacenters and cities:

Node IDs | Datacenter | Cities
Expand Down

0 comments on commit e025cf6

Please sign in to comment.