Returns a “short” universal identifier as a 64-bit unsigned integer (rather than a string-form 128-bit identifier as returned by the UUID() function). The value of UUID_SHORT() is guaranteed to be unique if the following conditions hold: The server_id of the current host is unique among your set of master and slave servers server_id is between 0 and 255 You don’t set back your system time for your server between mysqld restarts You do not invoke UUID_SHORT() on average more than 16 million times per second between mysqld restarts The UUID_SHORT() return value is constructed this way: (server_id & 255) << 56 + (server_startup_time_in_seconds << 24) + incremented_variable++;
mysql> SELECT UUID_SHORT(); -> 92395783831158784 Note that UUID_SHORT() does not work with statement-based replication.