Open kevinmichaelchen opened 6 years ago
Are Snowflakes still a good idea in the context of a distributed DB?
Per this thread (https://news.ycombinator.com/item?id=14523523):
in a distributed database like CockroachDB (Disclosure: I'm the co-founder and CTO of Cockroach Labs) or Google Cloud Spanner, it's usually better to get the random scattering of a UUID primary key, because that spreads the workload across all the nodes in the cluster. Sometimes query patterns benefit enough from an ordered PK to overcome this advantage, but usually it's better to use randomly-distributed PKs by default.
CockroachDB can easily be swapped for Postgres using the pq driver.
https://www.cockroachlabs.com/docs/stable/build-a-go-app-with-cockroachdb.html