Purpose
This statement series is used to trigger refresh operations, including refreshing schemas, timezone 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]
tenant_list:
tenant_name,tenant_name ...
Parameters
| Parameter | Description |
|---|---|
| REFRESH SCHEMA | Refreshes the schema. Note Normally, when the system performs a DDL operation, the Root Service automatically notifies all OBServer nodes to refresh the schema. However, if some OBServer nodes experience network issues with the Root Service, manual schema refresh is required. |
| REFRESH TIME_ZONE_INFO | Notifies all servers in the cluster to update their local timezone information.
NoteThis parameter is not supported in the current version. |
| FLUSH KVCACHE | Clears the dynamic memory KVCache.
|
Examples
Refresh the schema.
obclient> ALTER SYSTEM REFRESH SCHEMA; Query OK, 0 rows affectedRefresh all KVCache.
obclient> ALTER SYSTEM FLUSH KVCACHE; Query OK, 0 rows affectedRefresh the KVCache for the MySQL tenant.
obclient> ALTER SYSTEM FLUSH KVCACHE TENANT 'MySQL'; Query OK, 0 rows affected