Syntax
UUID_SHORT()
Purpose
You can call this function to return a short universal identifier as a 64-bit unsigned integer.
If the following conditions are met, the value returned by UUID_SHORT() is unique:
The
server_idof the current server ranges from 0 and 255 and is unique within a group of source and replica servers. If the sum ofserver_idvalues is greater than 256, the generated short universal identifier may not be unique in space, although this function does not return an error.Do not set the system time of an OBServer during its restart.
During the restart of an OBServer, the
UUID_SHORT()function is called less than 16 million times per second on average.
Structure of the value returned by UUID_SHORT():
(server_id & 255) << 56
+ (server_startup_time_in_seconds << 24)
+ incremented_variable++;
Examples
obclient> SELECT UUID_SHORT();
+-----------------------+
UUID_SHORT()
+-----------------------+
92395783831158784
+-----------------------+
1 row in set