SQL Server with Mr. Denny

Jul 24 2013   7:00AM GMT

Blocking Is Not Bad

Denny Cherry Denny Cherry Profile: Denny Cherry

When dealing with SQL Server databases we have to deal with locking, and blocking within our application databases.  All to often we talk about blocking as being a bad thing.  How ever in reality blocking isn’t a bad thing.  The SQL Server uses blocking to ensure that only one person is accessing some part of the database at a time.  Specifically blocking is used to ensure that when someone is writing data that no one else can read that specific data.

While this presents as a royal pain in that users queries run slower than expected, the reality is that we don’t want users accessing incorrect data, and we don’t want to allow two users to change the same bit of data. Because of this we have locking, which then leads to blocking within the database.

All of this is done to ensure that data integrity is maintained while the users are using the application so that they can ensure that the data within the database is accurate and correct.

Without locking and blocking we wouldn’t have data that we could trust.

Denny

1  Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Jdanton
    Without locking we would have a bad NoSQL database. 
    20 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: