Purpose
This statement is used to clear the sequence cache.
Note
This statement was introduced in V4.4.1.
Privilege requirements
To execute this statement, the current user must have the ALTER SYSTEM privilege. For more information about the privileges of OceanBase Database, see Privilege types in MySQL mode.
Syntax
ALTER SYSTEM FLUSH SEQUENCE CACHE
SEQUENCE_NAME = sequence_name
TENANT = 'tenant_name'
DATABASES = 'database_name'
[GLOBAL];
Parameters
| Parameter | Description |
|---|---|
| SEQUENCE_NAME = 'sequence_name' | The name of the sequence whose local cache needs to be cleared. |
| TENANT = 'tenant_name' | The tenant under which this operation is performed. |
| DATABASES = 'database_name' | The database under which this operation is performed. |
| GLOBAL | Optional. Specifies to clear the cache on all nodes. If this parameter is not specified, the cache on only the current node is cleared. |
Examples
Clear the cache of the
test_seq1sequence on the current node in thetestdatabase of themysql001tenant.obclient> ALTER SYSTEM FLUSH SEQUENCE CACHE SEQUENCE_NAME = test_seq1 DATABASES = 'test' TENANT = 'mysql001';Clear the cache of the
test_seq1sequence on all nodes in thetestdatabase of themysql001tenant.obclient> ALTER SYSTEM FLUSH SEQUENCE CACHE SEQUENCE_NAME = test_seq1 DATABASES = 'test' TENANT = 'mysql001' GLOBAL;
