Questions tagged [uuid]

A Universally Unique Identifier (UUID), GUID in Microsoft parlance.

Filter by
Sorted by
Tagged with
13
votes
4answers
5k views

What can go wrong using the same sequence across multiple tables in postgres?

We are considering using a shared sequence to assign ids to primary keys for all of the tables in our database. There are about 100 of them. Only a couple are inserted to frequently and regularly. We ...
2
votes
1answer
2k views

mariadb Unknown system variable 'server_uuid'

Im trying to setup replication between mariadb(10.1.31-MariaDB - MASTER) and mysql(5.7.12-log - SLAVE). After executed the start slave, I got the below error. Fatal error: The slave I/O thread ...
93
votes
2answers
138k views

Default value for UUID column in Postgres

In Postgres 9.x, for a column of type UUID, how do I specify a UUID to be generated automatically as a default value for any row insert?
23
votes
2answers
16k views

What is the purpose of a Row_GUID column?

I've been digging around in the AdventureWorks2012 database and see Row_GUID used in several tables. There are 2 parts to my question: When should I include a Row_GUID column? What are the uses and ...
13
votes
3answers
4k views

Does Postgres offer a feature like “NEWSEQUENTIALID” in MS SQL Server to make UUID as primary key more efficient

Microsoft SQL Server offers the NEWID command to generate a new GUID (the Microsoft version of UUID) value that can be used as a primary key value (in their uniqueidentifier data type). These are not ...
4
votes
2answers
2k views

Clustered Sequential GUID Primary Key vs Non-Clustered GUID and Clustered Sequential ID Primary Keys

I'm trying to figure out what the optimal solution is in regards to size and performance when using GUIDs as a primary key. The main reason for wanting GUIDs is that it's more appropriate in our micro-...
19
votes
2answers
11k views

Is there a penalty for using BINARY(16) instead of UNIQUEIDENTIFIER?

I've recently inherited a SQL Server database that uses BINARY(16) instead of UNIQUEIDENTIFIER to store Guids. It does this for everything including primary keys. Should I be concerned?
18
votes
2answers
4k views

SQL Server UniqueIdentifier / GUID internal representation

A colleague of mine sent me an interesting question, that I can't entirely explain. He ran some code (included below) and got somewhat unexpected results from it. Essentially, when converting a ...
5
votes
2answers
18k views

Casting an array of texts to an array of UUIDs

How can I cast an array of texts into an array of UUIDs? I need to do a join between two tables: users and projects. The users table has an array field named project_ids containing the project IDs ...
3
votes
1answer
2k views

`uuid_generate_v1mc` in Postgres “uuid-ossp” module: What is random multicast MAC address?

The uuid-ossp module extension (plugin) for Postgres offers this alternative method for generating a UUID value. uuid_generate_v1mc() This function generates a version 1 UUID but uses a random ...
0
votes
3answers
1k views

MySQL UUID() behavior

4 years ago, I answered a question on SO, "how to set an UUID for each row in bulk". I answered, after trying it, UPDATE table SET uuidcol = UUID(); It worked for me, but about half (it ...