Many systems use surrogate primary keys generated by a sequence generator. It's simple, easy, and guarantees unique values. Unfortunately in a multithreaded environment it leads to issues with concurrent memory structures updates. The problem is additionally magnified in distributed environment with cache coherency. This analysis presents the problem and aims to find solutions.