Professional Web Applications Themes

When to use UUID - Coldfusion Database Access

I use MYSQL, but I think this is a general database design question: <b>Is it a good idea to use UUIDs to generate unique indexes and primary keys in tables?</b> I don't know an awful lot about the performance aspect of databases and I'm concerned that using keys and indexes that are 35 characters long is going to waste disk space and processing time. If I did use UUIDs, would <b>Partial indexing</b> be the best way to handle them?...

  1. #1

    Default When to use UUID

    I use MYSQL, but I think this is a general database design question:

    <b>Is it a good idea to use UUIDs to generate unique indexes and primary keys
    in tables?</b> I don't know an awful lot about the performance aspect of
    databases and I'm concerned that using keys and indexes that are 35 characters
    long is going to waste disk space and processing time.

    If I did use UUIDs, would <b>Partial indexing</b> be the best way to handle
    them?



    SillyHerbert Guest

  2. #2

    Default Re: When to use UUID

    ColdFusion's UUID is overkill for many database needs. The majority of the
    time, if you need to generate a new series of numbers to act as unique id for a
    table, you'll want to have the database do that for you by adding a identity
    column to the table.

    The UUID is meant to be unique over a network, which is why it's so large.
    The records in your table need only be unique in that table so you don't need
    such a long number. It would be wasteful in terms of storage, memory,
    bandwidth and would be hard for humans to deal with when they need to.

    JaredJBlackburn Guest

Similar Threads

  1. Database UUID problems
    By jgladnick in forum Coldfusion Database Access
    Replies: 2
    Last Post: February 28th, 10:32 AM
  2. Cant delete a row using a UUID as the PK
    By zorg in forum Coldfusion Database Access
    Replies: 1
    Last Post: August 24th, 04:28 AM
  3. Using CHAR to store UUID in SQL Server
    By Zeitgeist in forum Coldfusion - Advanced Techniques
    Replies: 3
    Last Post: February 22nd, 08:53 PM
  4. generationg an UUID
    By patuf in forum PHP Development
    Replies: 5
    Last Post: May 18th, 12:13 PM
  5. ADO 2.8 UUID (for use with ASP on Windows 2003)
    By Josh Hillman in forum ASP Database
    Replies: 2
    Last Post: October 18th, 01:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139