UUID_SHORT
Stai visualizzando una vecchia versione di questo article. Visualizza
la versione più recente.
Sintassi
UUID_SHORT()
Spiegazione
Restituisce un universal identifier "breve", un intero senza segno di 64 bit (invece della stringa di 128 bit restituita dalla funzione UUID()
).
Il valore di UUID_SHORT()
è sicuramente unico, finché sussistono le seguenti condizioni:
- 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++;
Examples:
MariaDB [(none)]> SELECT UUID_SHORT(); +-------------------+ | UUID_SHORT() | +-------------------+ | 21517162376069120 | +-------------------+
See also
- UUID() ; Return full (128 bit) Universal Unique Identifier
Commenti
Sto caricando i commenti......
Content reproduced on this site is the property of its respective owners,
and this content is not reviewed in advance by MariaDB. The views, information and opinions
expressed by this content do not necessarily represent those of MariaDB or any other party.