Earlier quoted context omitted.
The logistics of combining fields in indexes and identifiers is relatively complex, while the logistics of indexing a single field is comparatively trivial. This is also why you don't ship timestamps using separate fields for second/minute/hour/day/month/year, but a single ISO-string or UNIX timestamp as representation: it makes querying and interpreting the value more consistent.
Create a new column with an MD5 hash of the other columns. Easy. /s
Nanosecond timestamp collisions are common
231–240 of 291 posts
Re: Nanosecond timestamp collisions are common
#232Earlier quoted context omitted.
> location of birth may change My British passport says I was born in Birr; my Irish passport says I was born in Galway. These are both correct, because they are answering different questions. (I was born in the town of Ballinasloe in County Galway, but my mother's place of residence at the time of my birth was the town of Birr in County Offaly.)
So British place of birth means "mother's residence" and not place of birth?
Could maybe be just a mistake when doing the UK registration ? It's an easy fix if wanted.
Re: Nanosecond timestamp collisions are common
#233Earlier quoted context omitted.
You’re complaining that the infrastructure details are bleeding into the intrastructure implementation?
Infrastructure details are bleeding into non-infrastructure implementation. Your database content is not an infrastructure implementation.
Re: Nanosecond timestamp collisions are common
#234Re: Nanosecond timestamp collisions are common
#235Earlier quoted context omitted.
For devices clocked above 1Ghz it's perfectly possible for the clock to increment every ns, although that doesn't make it accurate to that level, and multi core systems may have clocks that are not synchronised to that level. ARMv8 guarantees that it's clock increments at at least 1Ghz, for intel and earlier ARM it's more complicated
Cycle counting is one thing, but it gets tricky when you have frequency scaling in play. Another problem that even without freq scaling, cpu clocks are not designed to be super accurate/exact, and the true frequency might vary significantly even if the nominal freq is fixed
Re: Nanosecond timestamp collisions are common
#236At some point doesn’t this come down to the ISA? A CPU running at 3GHz gets 3 clock cycles per nanosecond. I bet there is a fair amount of optimization in the compiler that leads to back to back assembly calls of reading the clock register. If subsequent time.Now() calls happen within 3 clock cycles of each other, can you really fairly expect unique nanosecond precision…
Re: Nanosecond timestamp collisions are common
#237I’ve met too many people who are surprised by millisecond or microsecond timestamp collisions. My most memorable and least favorite variety of this is when people try to assemble a timestamp from two system calls, one for the most significant digits and a second for the least. If the smallest digits roll over from 99x to 00x after you read the large digits, due to process preemption, you can create a time stamp for a…
“It can’t be a race condition as those two events happened in the exact same time”
Re: Nanosecond timestamp collisions are common
#238Earlier quoted context omitted.
UUID7 was first drafted a bit over a year ago: https://datatracker.ietf.org/doc/html/draft-peabody-dispatch...
That's kinda what I figured. So you can see my confusion.
[1] https://github.com/swyxio/brain/blob/master/R%20-%20Dev%20No...
Re: Nanosecond timestamp collisions are common
#239If you want unique identifiers, use version 4 (random) UUIDs. Problem solved. The probability of a collision is roughly the same as the probability of a fully grown dinosaur spontaneously manifesting in your bedroom due to quantum fluctuations.
the dinosaur is now on my bed, what next?
Re: Nanosecond timestamp collisions are common
#240Earlier quoted context omitted.
So British place of birth means "mother's residence" and not place of birth?
Official guidances here: https://assets.publishing.service.gov.uk/government/uploads/... Could maybe be just a mistake when doing the UK registration ? It's an easy fix if wanted.
Changes! lol