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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:59:25+00:00 2026-05-29T05:59:25+00:00

At work we’ve been hacking away at a stored procedure and we noticed something.

  • 0

At work we’ve been hacking away at a stored procedure and we noticed something.

For one of our update statements, we noticed that if the values are the same as the previous values we had a performance gain.

We were not saying

UPDATE t1 SET A=5

where the column was already was equal to 5. We were doing something like this:

UPDATE t1 SET A = Qty*4.3

Anyway, is SQL Server smart enough not to do the operation if the values evaluate to the same in an UPDATE operation or am I just being fooled by some other phenomena?

  • 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-29T05:59:26+00:00Added an answer on May 29, 2026 at 5:59 am

    Yes you will see some performance gains. I recommend reading this article to get a better understanding (it will explain why much better than I can):

    https://sqlkiwi.blogspot.com/2010/08/the-impact-of-non-updating-updates.html

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

Sidebar

Related Questions

I work on an application that has been converted from pure JDBC to Spring
At work we are currently still using JUnit 3 to run our tests. We
At work, we have multiple branches that we may be working on at any
At work I have two XP PCs. On one, I can click with the
I work with a client that is using purchase orders, and a custom order's
Work on C#, in one of my application I need to get the SQL
I work on a WPF application that has multiple canvases and lots of buttons.
I work for a .NET/MSSQL shop that has trouble supporting customers running Novell, partially
I work in an environment that is totally .NET. However, over the past few
I work with an e-commerce website that uses a PayPal checkout component written in

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.