Hacker News new | ask | show | jobs
by jensenbox 1102 days ago
What is the difference in size on disk between the two options?
1 comments

An enum stores a small reference to the enum value in the tuples, and the constraint approach stores the string itself. The constraint approach takes more space with (a) larger enum values, (b) more columns using them, and (c) more rows in the tables that use them. The difference depends on the characteristics of the database we're talking about.