Purpose
This statement is used to clear the sequence cache.
Privilege requirements
The current user must have the ALTER SYSTEM privilege to execute this statement. For more information about OceanBase AI Database privileges, see Permission classification.
Syntax
ALTER SYSTEM FLUSH SEQUENCE CACHE
SEQUENCE_NAME = sequence_name
TENANT = 'tenant_name'
DATABASES = 'database_name'
[GLOBAL];
Parameters
Parameter |
Description |
|---|---|
| SEQUENCE_NAME = 'sequence_name' | Specifies the name of the sequence whose local cache needs to be cleared. |
| TENANT = 'tenant_name' | Specifies the tenant under which to perform this operation. |
| DATABASES = 'database_name' | Specifies in which database to perform this operation. |
| GLOBAL | Optional. Clears the cache on all nodes. If this parameter is not specified, only the cache on the current node is cleared. |
Examples
Purge the cache of the sequence named
test_seq1on the current node under themysql001tenant and the database namedtest.obclient> ALTER SYSTEM FLUSH SEQUENCE CACHE SEQUENCE_NAME = test_seq1 DATABASES = 'test' TENANT = 'mysql001';Purge the cache of the sequence named
test_seq1from all nodes in themysql001tenant under the database namedtest.obclient> ALTER SYSTEM FLUSH SEQUENCE CACHE SEQUENCE_NAME = test_seq1 DATABASES = 'test' TENANT = 'mysql001' GLOBAL;