Rules

Background

This section explains how to configure the ShardingSphere-Proxy rules.

Parameters Explained

Rules configuration for ShardingSphere-Proxy is the same as ShardingSphere-JDBC. For details, please refer to ShardingSphere-JDBC Rules Configuration.

Notice

Unlike ShardingSphere-JDBC, the following rules need to be configured in ShardingSphere-Proxy’s global.yaml:

  1. sqlParser:
  2. sqlStatementCache:
  3. initialCapacity: 2000
  4. maximumSize: 65535
  5. parseTreeCache:
  6. initialCapacity: 128
  7. maximumSize: 1024
  1. transaction:
  2. defaultType: XA
  3. providerType: Atomikos
  1. sqlTranslator:
  2. type:
  3. useOriginalSQLWhenTranslatingFailed:
  1. sqlFederation:
  2. sqlFederationEnabled: true
  3. allQueryUseSQLFederation: false
  4. executionPlanCache:
  5. initialCapacity: 2000
  6. maximumSize: 65535