title: Strategies to use Database Sequences?
body: <p>I have a high-end architecture which receives many requests every second (in fact, it can receive many requests every millisecond). The architecture is designed so that some controls rely on a certain unique id assigned to each request. </p>
  
  <p>To create such UID we use a DB2 Sequence. Right now I already understand that this approach is flawed, since using the database is costly, but it makes sense to do so because this value will also be used to log information on the database.</p>
  
  <p>My team has just found out an increase of almost 1000% in elapsed time for each transaction, which we are assuming happened because of the sequence. Now I wonder, <strong>using sequences will serialize access to my application?</strong> Since they have to guarantee that increments works the way they should, they have to, right?</p>
  
  <p>So, are there better strategies when using sequences? Please assume that I have no other way of obtaining a unique id other than relying on the database.</p>