Universally Unique Identifiers, also known as UUIDs, are designed to allow developers to generate unique IDs in a way that guarantees uniqueness without knowledge of other systems. These are especially useful in a distributed architecture, where you have a number of systems and databases responsible for creating records. You might think that using UUIDs as a primary key in a database is a great idea, but when used incorrectly, they can drastically hurt database performance. In this article, you'll learn about the downsides of using UUIDs as a primary key in your MySQL database. The many versions of UUIDs At the time of this writing, there are five official versions of UUIDs and three proposed versions. Let's take a look at each version to better understand how they work. UUIDv1 A UUID version 1 is known as a time-based UUID and can be broken down as follows:
While much of modern computing uses the UNIX epoch time (Jan 1, 1970) as its base, …
[Read more]