Better HN
topnewbestaskshowjobs
Log inSign up

mreftel

4 karma · joined Mar 26, 2015 (11y ago) · 3 submissions

Submissions

comment 9y ago · link · parent

This was on Oracle, which lacks MS SQL's special handling of UUIDs (which speeds up indexes on UUID columns by using the bytes for the time stamp in UUIDv1/v2 as the high-order bytes - clever hack!). But sure, if you need UUIDs and your database has support for speeding them up, by all means, use that. I'd still avoid them given a choice, though.

comment 9y ago · link · parent

"Then add a column populated with a UUID (perhaps as a trigger on insert). Within the scope of the database itself, relationships can be managed using the real PKs and FKs." That would mean doing lookups by UUID, which is /really/ bad for performance. UUIDs are evenly distributed, so index caches are rendered nearly useless. With sequential keys, and access patterns that touch mostly new data, all you need to find the row is likely to already be in RAM, no matter how many rows you have. With UUIDs, you'd end up doing random I/O. Might not sound like that big deal to some, but we got a 3x overall throughput increase in one of our apps by switching from UUIDs to sequential ints.

comment 9y ago · link · parent

...with e24 as the sole source. Not saying it's not true, just that dn.no repeating it is not /that/ much of confirmation.