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 8120221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T05:04:33+00:00 2026-06-06T05:04:33+00:00

About best practices on designing stored procedures, should a stored procedure updating a record

  • 0

About best practices on designing stored procedures, should a stored procedure updating a record in a table use the Primary Key to identify the record to be updated, or the Unique Key?

The Unique Key seems like a lot of additional parameters to send in and I can’t think of a situation where the Primary Key wouldn’t be known.

  • 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-06-06T05:04:36+00:00Added an answer on June 6, 2026 at 5:04 am

    This question bears 2 different aspects.

    • The goal: what you want to achieve is to update a given row. Any means allowing you to reach this point is good; in other terms, if the unique key, the primary key or any other combinaison of columns not listed under any unicity constraint would be ok then you might use it.
    • The performances: as any other query you really want to go fast and straight to the point. What does it mean? It means that you have to chose the most efficient filter in you where clause. You can measure this by:

    1/ the size of the index you are using: choose the smallest one (column size for instance)

    2/ the not null attribute of the column of the index you are using: (if your engine allows unique indexes on nullable columns) choose preferably an index that is placed on a NOT nullable column.

    3/ the tablespace of the index: you could also see if there is a special storage for an index rather than another, that would improve performances (mounted indexes…)

    4/ the column type: usually small numbers are faster to parse than texts (apologize not having sources for that, take it with care)

    I can’t think of more now, but I’m pretty sure other people will complete the list.

    Cheers.

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

Sidebar

Related Questions

surfing on the web, reading about django dev best practices points to use pickled
I have a question about best practices related to de-normalization or table hierarchy relationships.
I have a question about best practices regarding how one should approach storing complex
Where can find resources about best practices for SharePoint programming? I am talking about
I'm new to web development and am just wondering about best practices for java
I know this is a subjective question, but I'm always curious about best-practices in
I was wondering about some best practices for data binding in web forms. For
I want to know about the best practices here. Suppose I want to get
for a data warehouse project I need to know about some best practices regarding
This may be a question about convention, best practices and/or personal preferences: So I'm

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.