Unix Technical Forum

UUID() / GUID Storage and Indexing

This is a discussion on UUID() / GUID Storage and Indexing within the MySQL forums, part of the Database Server Software category; --> It seems the most compact way to store a UUID is to do the following into a BINARY(16): UNHEX(REPLACE(UUID(), ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 10:20 AM
murraybrad@gmail.com
 
Posts: n/a
Default UUID() / GUID Storage and Indexing

It seems the most compact way to store a UUID is to do the following
into a BINARY(16):

UNHEX(REPLACE(UUID(), '-', ''))

If this is the be the primary key, would it be better for index
fragmentation to do the following:

UNHEX(REVERSE(REPLACE(UUID(), '-', '')))

instead so that the inserts are at least in order?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:11 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com