<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/stop-using-uuids-in-your-database-g7al89qis" -->

---
title: Stop Using UUIDs in Your Database | daily.dev
description: This post discusses the performance issues and storage impact of using UUIDs as keys in a database.
canonical: https://daily.dev/posts/stop-using-uuids-in-your-database-g7al89qis
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Stop Using UUIDs in Your Database | daily.dev
og:description: This post discusses the performance issues and storage impact of using UUIDs as keys in a database.
og:url: https://daily.dev/posts/stop-using-uuids-in-your-database-g7al89qis
og:image: https://api.daily.dev/og/posts/G7AL89QIS.png
og:image:alt: Stop Using UUIDs in Your Database
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Stop Using UUIDs in Your Database

**[Community Picks](https://daily.dev/sources/community)** · 3 min read · 551 upvotes · 72 comments

## Summary

This post discusses the performance issues and storage impact of using UUIDs as keys in a database.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.danielfullstack.com/article/stop-using-uuids-in-your-database>

## Community discussion

Top comments from developers on daily.dev.

**@randy** · 187 upvotes

> From the conclusion:
> > UUIDs are a great way to ensure uniqueness between records in a table.
>
> And that's precisely why people use them. Until you can provide a way to do that that doesn't have the performance hit "at scale," can we just stop writing the same article over and over?

**@vorandrew** · 37 upvotes

> It's so shallow and stupid it impressed me

**@vorandrew** · 35 upvotes

> Remember guys, when shit hits the fun and you need to fix these broken incremental ID foreign keys during weekend you will be ready to sell your soul to devil for UUID solutions implemented at the very beginning

**@atinypixel** · 26 upvotes

> I don't think any company would discard the use of UUIDs just because it takes a few millis more to operate or take few KBs more to store.
>
> Remember, Security > Slightly High Speed with low security.
>
> Especially in these times, when DB providers have out of the box integrations for the UUIDs in the best optimized way!

**@addaui** · 22 upvotes

> The benefits of using UUID outweigh the disadvantages of using it.
> also, some DBs already have UUID optimizations like Postgres which does have a `uuid` datatype.

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#database](https://daily.dev/tags/database), [#storage](https://daily.dev/tags/storage)

[View this post on daily.dev](https://daily.dev/posts/stop-using-uuids-in-your-database-g7al89qis)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Stop Using UUIDs in Your Database","url":"https://daily.dev/posts/stop-using-uuids-in-your-database-g7al89qis","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/stop-using-uuids-in-your-database-g7al89qis"},"datePublished":"2024-05-31T10:44:15.367Z","dateModified":"2024-08-23T14:37:22.392Z","description":"This post discusses the performance issues and storage impact of using UUIDs as keys in a database.","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d317dcd3b3d8a276f6002a1c49f7ca9a?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/d317dcd3b3d8a276f6002a1c49f7ca9a?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"Community Picks","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Community Picks","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1655817725/logos/community","url":"https://daily.dev/sources/community"},"commentCount":72,"discussionUrl":"https://daily.dev/posts/stop-using-uuids-in-your-database-g7al89qis","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":551},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":72}],"keywords":"performance,database,storage","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Community Picks","item":"https://daily.dev/sources/community"},{"@type":"ListItem","position":3,"name":"Stop Using UUIDs in Your Database"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/stop-using-uuids-in-your-database-g7al89qis","comment":[{"@type":"Comment","text":"From the conclusion:\n\nUUIDs are a great way to ensure uniqueness between records in a table.\n\nAnd that’s precisely why people use them. Until you can provide a way to do that that doesn’t have the performance hit “at scale,” can we just stop writing the same article over and over?","datePublished":"2024-05-31T13:55:54.029Z","url":"https://daily.dev/posts/G7AL89QIS#c-d3LOewrdD","author":{"@type":"Person","name":"Randy","url":"https://daily.dev/randy","image":"https://media.daily.dev/image/upload/s--UjV4-KkB--/f_auto/v1708097210/avatars/avatar_HXYbbGcBO38Rfv7RrCBdA"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":187}},{"@type":"Comment","text":"It’s so shallow and stupid it impressed me","datePublished":"2024-06-01T17:26:51.138Z","url":"https://daily.dev/posts/G7AL89QIS#c-Bv2QZSWeH","author":{"@type":"Person","name":"Andrew Vorobyov","url":"https://daily.dev/vorandrew","image":"https://avatars.githubusercontent.com/u/290555?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":37}},{"@type":"Comment","text":"Remember guys, when shit hits the fun and you need to fix these broken incremental ID foreign keys during weekend you will be ready to sell your soul to devil for UUID solutions implemented at the very beginning","datePublished":"2024-06-02T08:12:29.093Z","dateModified":"2024-06-02T13:00:25.414Z","url":"https://daily.dev/posts/G7AL89QIS#c-E28mUYoAg","author":{"@type":"Person","name":"Andrew Vorobyov","url":"https://daily.dev/vorandrew","image":"https://avatars.githubusercontent.com/u/290555?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":35}},{"@type":"Comment","text":"I don’t think any company would discard the use of UUIDs just because it takes a few millis more to operate or take few KBs more to store.\nRemember, Security &gt; Slightly High Speed with low security.\nEspecially in these times, when DB providers have out of the box integrations for the UUIDs in the best optimized way!","datePublished":"2024-06-02T05:04:31.945Z","url":"https://daily.dev/posts/G7AL89QIS#c-mP2mvK8sA","author":{"@type":"Person","name":"Aziz Kaukawala","url":"https://daily.dev/atinypixel","image":"https://media.daily.dev/image/upload/s--O3nePx4j--/f_auto/v1770442459/avatars/avatar_ElHLWRh0cZEB6Zl8kgRRl?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":26}},{"@type":"Comment","text":"The benefits of using UUID outweigh the disadvantages of using it.\nalso, some DBs already have UUID optimizations like Postgres which does have a uuid datatype.","datePublished":"2024-06-02T12:02:50.197Z","url":"https://daily.dev/posts/G7AL89QIS#c-LBpUNX3iP","author":{"@type":"Person","name":"Audai Al-Fandi","url":"https://daily.dev/addaui","image":"https://media.daily.dev/image/upload/s--p3mER58q--/f_auto/v1717329973/avatars/avatar_PNor0vl3R85vk1pqHUmxq"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":22}}]}
```

