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 OceanBase Database privileges, see Privilege classification in Oracle-compatible mode.
Syntax
ALTER SYSTEM FLUSH SEQUENCE CACHE
SEQUENCE_NAME = sequence_name
[GLOBAL];
Parameters
| Parameter | Description |
|---|---|
| SEQUENCE_NAME = 'sequence_name' | The name of the sequence whose local cache needs to be cleared. |
| GLOBAL | Optional. Specifies to clear the cache on all nodes. If this parameter is not specified, only the cache on the current node is cleared. |
Examples
Clear the cache of the
test_seq1sequence on the current node in the current tenant and schema.obclient> ALTER SYSTEM FLUSH SEQUENCE CACHE SEQUENCE_NAME = test_seq1;Clear the cache of the
test_seq1sequence on all nodes in the current tenant and schema.obclient> ALTER SYSTEM FLUSH SEQUENCE CACHE SEQUENCE_NAME = test_seq1 GLOBAL;
References
- For more information about the syntax for creating a sequence, see CREATE SEQUENCE.