Details

    • Type: Task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Fix Version/s: 10.2
    • Component/s: None
    • Labels:

      Description

      The current way of handling uuid's in MariaDB is not very user friendly. If you want to do it right you have to replace all 4 "-" chars with "" and store it in a binary(16) type and so on. That is a lot of work and sadly people start to use just varchar() for it because it's easier. But that is a huge performence problem.

      To fix that i would propose to add a "uuid" datatype to MariaDB the same way PostgreSQL did it. http://www.postgresql.org/docs/9.2/static/datatype-uuid.html

      That would make working with uuid's a lot easier and faster.
      Thanks and greetings
      Leo

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              backbone Oliver Hoff added a comment - - edited

              A datatype will maybe less useful for current applications, because of BC schemas, but I would recommend it for new schema.
              For current schemas some (robust) conversion between textual and binary representation of UUIDs would be very helpful, although this functions can be shimed on legacy systems.

              Show
              backbone Oliver Hoff added a comment - - edited A datatype will maybe less useful for current applications, because of BC schemas, but I would recommend it for new schema. For current schemas some (robust) conversion between textual and binary representation of UUIDs would be very helpful, although this functions can be shimed on legacy systems.
              Hide
              serg Sergei Golubchik added a comment -

              You can convert from text uuid to binary with something like unhex(replace(uuid, "-", "")).

              But yes, a dedicated type would be much more convenient, I agree.

              Show
              serg Sergei Golubchik added a comment - You can convert from text uuid to binary with something like unhex(replace(uuid, "-", "")). But yes, a dedicated type would be much more convenient, I agree.
              Hide
              corydoras Jacob Rhoden added a comment -

              Recommend that this is implemented as a native data type, not plugin or other method, given the fact that people will be using this as a primary key.

              Show
              corydoras Jacob Rhoden added a comment - Recommend that this is implemented as a native data type, not plugin or other method, given the fact that people will be using this as a primary key.
              Hide
              serg Sergei Golubchik added a comment -

              Also, the benefits of the dedicated type would be (quoting MDEV-5593):

              • more comfortable because they do not have to do hex / unhex and remove dash
              • faster index than varchar variant
              • automatic generation of UUID if inserted record with NULL PK
              Show
              serg Sergei Golubchik added a comment - Also, the benefits of the dedicated type would be (quoting MDEV-5593 ): more comfortable because they do not have to do hex / unhex and remove dash faster index than varchar variant automatic generation of UUID if inserted record with NULL PK

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  leo.unglaub Leo Unglaub
                • Votes:
                  9 Vote for this issue
                  Watchers:
                  9 Start watching this issue

                  Dates

                  • Created:
                    Updated: