Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.91 KB

when-to-use-regional-vs-global-tables.md

File metadata and controls

35 lines (25 loc) · 1.91 KB
title summary toc
When to use REGIONAL vs. GLOBAL tables
Learn how to use CockroachDB's improved multi-region user experience.
true

New in v21.1: Table Localitiestell CockroachDB how to optimize access to a table's data in a multi-region cluster. CockroachDB uses the table locality setting to determine how to optimize access to the table's data from that locality.

The following table localities are available:

  • REGIONAL
  • GLOBAL

Use REGIONAL tables if:

  • Your application requires low-latency reads and writes from a single region.
  • Access to the table's data can be slower (higher latency) from other regions.
  • You would like finer-grained control of where specific data is located (either at the row level or the table level).

Use GLOBAL tables if:

  • Your application has a "read-mostly" table of reference data that is rarely updated, and that needs to be available to all regions.
  • You can accept that writes to the table will incur higher latencies from any given region, since writes have to be replicated across every region to make the global low-latency reads possible.

{{site.data.alerts.callout_success}} For more information about how to choose an overall multi-region configuration, see Choosing a multi-region configuration. {{site.data.alerts.end}}

See also