3 ms·
They show that they're storing the ULIDs as text. Quoting from the article: CREATE TABLE ulid_test(id TEXT); I suspect their poor results come from their c
by atombender 2y ago
They show that they're storing the ULIDs as text. Quoting from the article:
CREATE TABLE ulid_test(id TEXT);
I suspect their poor results come from their choice of ULID implementation. The native C implementation I tried out is faster than the Postgres UUID type when testing computation only.
I noticed a bug in their test: They call generate_ulid() with now(). But now() is an alias for transaction_timestamp(), which is computed once at the start of the transaction, so all the timestamps will be the same. They should be using clock_timestamp().
- sgarland 2y agoGood catch to both.