Syntax
UUID_SHORT()
Purpose
Returns a "short" universal identifier in the form of a 64-bit unsigned integer.
The return value of UUID_SHORT() is guaranteed to be unique if the following conditions are met:
The
server_idvalue of the current server is between 0 and 255 and is unique among a group of source servers and replica servers. If the total number ofserver_idvalues exceeds 256, the generated "short" universal identifier cannot be guaranteed to be space-unique, although this function will not return an error.Do not set the system time of the server host during OBServer restart.
The average number of calls to
UUID_SHORT()per second during OBServer restart is less than 16 million.
The return value of UUID_SHORT() is constructed as follows:
(server_id & 255) << 56
+ (server_startup_time_in_seconds << 24)
+ incremented_variable++;
Examples
obclient> SELECT UUID_SHORT();
+-----------------------+
| UUID_SHORT() |
+-----------------------+
| 92395783831158784 |
+-----------------------+
1 row in set
