All Products
Search
Document Center

Routing algorithm

Last Updated: Dec 11, 2019

Definition

  • Refers to an algorithm used to locate physical tables (table shards) mapping a logical table based on routing fields. When you need to use a logical table to query data in the SQLConsole or change or export data, you can configure a routing algorithm to precisely locate target physical tables based on conditions. This helps improve the efficiency of your data operations.
    • If you perform a data operation on a logical table without configuring a routing algorithm, the system will traverse all physical tables mapping the logical table. Consequently, the overall time consumed by the operation will be multiplied.
  • A routing algorithm consists of routing fields and an algorithm.

Usage

  1. Query data of table shards.
  2. Change data of table shards.
  3. Export data of table shards.

Configuration

  • Create or modify a routing algorithm
    • Find the target logical table in the corresponding logical database, and create or modify a routing algorithm for the logical table.