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

  • SEARCH
  • Home
  • 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 5946735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:51:53+00:00 2026-05-22T16:51:53+00:00

The application I have completed has gone live and we are facing some very

  • 0

The application I have completed has gone live and we are facing some very specific problems as far as response time is concerned in specific tables.

In short, response time in some of the tables that have 5k rows is very low. And these tables will grow in size.

Some of these tables (e.g. Order Header table) have a uniqueidentifier as the P.K. We figure that this may be the reason for the low response time.

On studying the situation we have decided the following options

  1. Convert the index of the primary key in the table OrderHeader to a non-clustered one.
  2. Use newsequentialid() as the default value for the PK instead of newid()
  3. Convert the PK to a bigint

We feel that option number 2 is ideal since option number 3 will require big ticket changes.

But to implement that we need to move some of our processing in the insert stored procedures to triggers. This is because we need to trap the PK from the OrderHeader table and there is no way we can use

Select @OrderID = newsequentialid() within the insert stored procedure.

Whereas if we move the processing to a trigger we can use

select OrderID from inserted

Now for the questions?

  1. Will converting the PK from newid() to newsequentialid() result in performance gain?

  2. Will converting the index of the PK to a non-clustered one and retaining both uniqueidentifier as the data type for PK and newid() for generating the PK solve our problems?

  3. If you faced a similar sort of situation please do let provide helpful advice

Thanks a tons in advance people

Romi

  • 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-22T16:51:53+00:00Added an answer on May 22, 2026 at 4:51 pm

    Convert the index of the primary key in the table OrderHeader to a non-clustered one.

    Seems like a good option to do regardless of what you do. If your table is clustered using your pkey and the latter is a UUID, it means you’re constantly writing somewhere in the middle of the table instead of appending new rows to the end of it. That alone will result in a performance hit.

    Prefer to cluster your table using an index that’s actually useful for sorting; ideally something on a date field, less ideally (but still very useful) a title/name, etc.

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

Sidebar

Related Questions

My application has several independent top-level windows, which all have completely different functions/workflows. I
How can I launch an application with administrator rights after I have completed an
I am responsible for a Delphi/Win32 project management application. I have just completed a
I see an application have used Log.info = some info where are these logs
I have a console app that I'm porting to WPF. The application has 3
I have almost completed my Android application so am considering ways of distributing the
I have used Observer Pattern for my application. I have a subject which has
I have just completed developing my web application. I was trying to deploy it
I have a splash screen/loading screen that has .setVisibility() to GONE right after the
I have completed my Project in VB.Net and has published my project. But i

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.