Purpose
This statement series is used to trigger refresh operations, including refreshing schemas, time zone information, and various caches.
This statement can only be executed in the sys tenant.
Syntax
alter_system_refresh_stmt:
ALTER SYSTEM refresh_action;
refresh_action:
REFRESH SCHEMA
| REFRESH TIME_ZONE_INFO
| FLUSH KVCACHE [TENANT [=] tenant_name] [CACHE [=] cache_name]
Parameters
Parameters |
Description |
|---|---|
| REFRESH SCHEMA | Refresh the schema. Note Normally, when the system performs a DDL operation, the Root Service proactively notifies all OBServer nodes to refresh their schemas. If an OBServer node fails or the network connection to the Root Service is interrupted, manual schema refresh is required. |
| REFRESH TIME_ZONE_INFO | Notifies all servers in the cluster to update their local time zone information.
NoteThis parameter is not supported in the current version. |
| FLUSH KVCACHE | Clear the dynamically scalable memory of the KVCache.
|
Examples
Refresh the schema.
obclient> ALTER SYSTEM REFRESH SCHEMA; Query OK, 0 rows affectedRefresh all KV caches.
obclient> ALTER SYSTEM FLUSH KVCACHE; Query OK, 0 rows affectedRefresh the user tenant's KVCache.
obclient> ALTER SYSTEM FLUSH KVCACHE TENANT 'MySQL'; Query OK, 0 rows affected