Bluehost.com Web Hosting $6.95

UUID() / GUID Storage and Indexing

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


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-31-2007
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?

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 04:56 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0