3 ms·
When I'm using integer surrogate keys to manipulate subsets of a table, they usually correspond to some kind of out-of-band predicate. Like this is the data th
by __MatrixMan__ 3y ago
When I'm using integer surrogate keys to manipulate subsets of a table, they usually correspond to some kind of out-of-band predicate. Like this is the data that appeared today, or this is everything after the bug happened, etc.
Maybe there are applications where the monotonicity matters, but in my experience reasoning by surrogate key is rather coarse grained and you manually scrutinize the boundaries, so unless your clocks are quite wrong, your worries are probably better placed elsewhere.
- erik_seaberg 3y agoI’ve seen too many people write a query like where ts between txn_start and txn_end order by ts and not even realize that what they’re seeing is incomplete and misleading. Clock skew is very common, and we shouldn’t sweep that under the rug to promote time ordering, because people want to believe this works the way they think.
- Foobar8568 3y agoClock skews in a single node database? Actual question.
- erik_seaberg 3y agoUsually Hive or Dremel, with rows ingested from frontend instance logs. I get that it would actually work on a smaller system with a single server assigning times (or a quorum, if leader election ensures a monotonic clock).
- Foobar8568 3y agoThank you, I was just wondering if it was something I missed out on simpler systems and not distributed ones.
- erik_seaberg 3y agoNah, places I’ve worked are just choosing commodity hardware and geographically distributed systems over (very expensive) centralized ones.