Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 741217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:36:24+00:00 2026-05-14T08:36:24+00:00

I have a high-end architecture which receives many requests every second (in fact, it

  • 0

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.

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.

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, using sequences will serialize access to my application? Since they have to guarantee that increments works the way they should, they have to, right?

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T08:36:25+00:00Added an answer on May 14, 2026 at 8:36 am

    Using a sequence will necessarily serialize your application. However, these things are optimized to have a minimla impact. Of course, we can always muck things up ourselves by declaring things in an unhelpful fashion. So, how is this sequence defined? Does it have a large CACHE? Have you specified NO ORDER?

    Having said which….

    The thing that leaps out from your question is not the phrase in bold, it is the sentence before it:

    “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.”

    We all know what ASSUME makes (well not in this case, because I’m assuming nothing). Has there been a recent change affecting this sequence? If not, why do you all think it is responsible for a sudden 1000% downturn in performance? Instead of assuming (i.e. guessing) perhaps it would be better to gather some evidence. That time is going somewhere, and you need to discover where. There’s no point in tweakling your sequence if you have a race condition somewhere in your code, or you are burning CPU waiting for a lock, or you have a bad interconnect which is slowing down writes to the SAN, etc, etc.

    Do you have any logging or trace switched on, or that you could switch on? Can you reproduce this slowdown in another environment, such as development or system test? It may be that the sequence is to blame. At least then you can approach the re-engineering task confident in the knowledge that you are addressing the real problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When creating system services which must have a high reliability, I often end up
If I have a high-end server, for example with 1T memory and 8x4core CPU...
I have a table that potentially will have high number of inserts per second,
I have a high score database for a game that tracks every play in
I am designing a distributed architecture where we will have a web front end
I have a high-level/conceptual question about Shibboleth. I'm working on the front-end (running Drupal)
I have a jQuery cycle script (which I wrote, so it's not high quality)
We have a high security application and we want to allow users to enter
I have searched high and low for documentation on how to use this feature.
We'll soon have some high school kids here in our company for some training

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.