Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
Read Committed_Snapshot
17 posts, Page 2 of 2
««
1
2
Read Committed_Snapshot
Rate Topic
Display Mode
Topic Options
Author
Message
Eugene Elutin
Eugene Elutin
Posted Monday, March 18, 2013 10:14 AM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 10:39 AM
Points: 2,556,
Visits: 4,398
Oops, too many windows. Post edited!
Actually, the code version you have seen for window 2, was a good code example, which would work properly with any isolation level...
_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!"
(So many miracle inventions provided by MS to us...)
How to post your question to get the best and quick help
Post #1432253
Grant Fritchey
Grant Fritchey
Posted Monday, March 18, 2013 10:41 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 3:41 AM
Points: 13,383,
Visits: 25,189
Eugene Elutin (3/18/2013)
Grant Fritchey (3/18/2013)
... or two as well.
Googled out the second one (surprisingly to me - based on "stock management":
http://www.jimmcleod.net/blog/index.php/2009/08/27/the-potential-dangers-of-the-read-committed-snapshot-isolation-level/
OK. For a lock control system as outlined, this would be a nightmare. No question.
I'd still suggest this is on the rarer side of the spectrum (if not actually rare), but it's absolutely worth noting.
Thanks!
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #1432265
Eugene Elutin
Eugene Elutin
Posted Monday, March 18, 2013 11:13 AM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 10:39 AM
Points: 2,556,
Visits: 4,398
Grant Fritchey (3/18/2013)
Eugene Elutin (3/18/2013)
Grant Fritchey (3/18/2013)
... or two as well.
Googled out the second one (surprisingly to me - based on "stock management":
http://www.jimmcleod.net/blog/index.php/2009/08/27/the-potential-dangers-of-the-read-committed-snapshot-isolation-level/
OK. For a lock control system as outlined, this would be a nightmare. No question.
I'd still suggest this is on the rarer side of the spectrum (if not actually rare), but it's absolutely worth noting.
Thanks!
Rarer or rare - I don't know how to judge. I've seen it happening before and not once...
Actually, when it happens, it may take huge effort to investigate and find the reason, as code doesn't fail - it runs smoothly
So, thanks for agreeing that it was worth mentioning. So pity, I've made mistake in my sample on the first posting...
_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!"
(So many miracle inventions provided by MS to us...)
How to post your question to get the best and quick help
Post #1432276
ScottPletcher
ScottPletcher
Posted Monday, March 18, 2013 4:40 PM
Ten Centuries
Group: General Forum Members
Last Login: Wednesday, May 22, 2013 3:56 PM
Points: 1,324,
Visits: 1,778
winmansoft, you should also be aware of the 14-byte-per-row overhead that READ_COMMITTED_SNAPSHOT requires. Anytime a row is updated, or a new row is inserted, the 14 bytes will be added. This can cause page splits if you don't have enough freespace in the page to hold the extra 14 bytes for each row updated.
There is also a big initial performance hit for any "old-style" ntext, text, and image columns (but not for the newer (max) data types). After RCS is enabled, the first time one of those "old-style" large columns are updated, SQL will have to rewrite the entire value, possibly using more pages (since each page holds 40 less bytes).
SQL DBA,SQL Server MVP('07, '08, '09)
One man with courage makes a majority. Andrew Jackson
Post #1432393
IT researcher
IT researcher
Posted Tuesday, March 19, 2013 10:44 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Today @ 6:26 AM
Points: 186,
Visits: 959
when the rows will be added to tempdb(update statement, select statement) and when it is cleared ?
Post #1432990
IT researcher
IT researcher
Posted Tuesday, March 19, 2013 11:39 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Today @ 6:26 AM
Points: 186,
Visits: 959
when the rows will be added to tempdb(update statement, select statement) and when it is cleared ?
Post #1433001
Grant Fritchey
Grant Fritchey
Posted Wednesday, March 20, 2013 4:47 AM
SSChampion
Group: General Forum Members
Last Login: Today @ 3:41 AM
Points: 13,383,
Visits: 25,189
winmansoft (3/19/2013)
when the rows will be added to tempdb(update statement, select statement) and when it is cleared ?
Read the documentation supplied by Microsoft. They lay it out there. In the most basic way, when the transaction starts a copy is made in tempdb and reads then go there while the data is updated in the original database. When the transaction completes, the copy is removed from temdb. In actuality it's more complicated than that, but that's it in a nutshell. Again, read the documentation.
----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of:
SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans
Product Evangelist for
Red Gate Software
Post #1433126
« Prev Topic
|
Next Topic »
17 posts, Page 2 of 2
««
1
2
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.