Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««4,3834,3844,3854,3864,387»»»

Are the posted questions getting worse? Expand / Collapse
Author
Message
Posted Thursday, May 1, 2014 11:36 AM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Today @ 7:42 PM
Points: 8,567, Visits: 9,071
Steve Jones - SSC Editor (5/1/2014)
Can someone do me a favor and try to edit a few of their own posts?

got a report of a bug here: http://www.sqlservercentral.com/Forums/Topic1566649-433-1.aspx?Update=1

It's a bit confusing that hitting edit on someone elses post takes you back to ypur last post. That probably whould be fixed sometime. But I suspect that hardly anyone ever encounters it - Id never seen it before I tried it today to see if it really happened - because people generally only edit their own posts (and as far as I can see there's no problem at all with that).


Tom
Post #1566807
Posted Thursday, May 1, 2014 1:31 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Today @ 1:54 PM
Points: 3,972, Visits: 2,983
TomThomson (5/1/2014)
Steve Jones - SSC Editor (5/1/2014)
Can someone do me a favor and try to edit a few of their own posts?

got a report of a bug here: http://www.sqlservercentral.com/Forums/Topic1566649-433-1.aspx?Update=1

It's a bit confusing that hitting edit on someone elses post takes you back to ypur last post. That probably whould be fixed sometime. But I suspect that hardly anyone ever encounters it - Id never seen it before I tried it today to see if it really happened - because people generally only edit their own posts (and as far as I can see there's no problem at all with that).

I've always seen the Edit button on all posts. I just tried to edit a few posts by other people and the page just reloaded without going anywhere, so it seems to work fine. Editing my own posts multiple times also works fine.

I did just find an interesting one while testing just now. I clicked Quote in this thread to type this post. In another browser tab, I clicked Edit to edit my own post and went no further. I came back to this browser tab and clicked Post Quoted Reply and got an error. I clicked the browser's back button and the displayed thread was the one I was editing in the other browser tab. I don't generally have multiple SSC tabs I'm editing and posting simultaneously, but stumbled across it while testing the edit button.

The error is:
Sorry the application encountered an unexpected error. Information about this error has been logged. If you continue to receive this message please contact the board administrator.



Tally Tables - Performance Personified
String Splitting with True Performance
Best practices on how to ask questions
Post #1566842
Posted Tuesday, May 6, 2014 6:42 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 7:27 PM
Points: 2,752, Visits: 7,186
I thought I remembered a discussion here months ago about NOLOCK possibly returning bad data even when there's no changed to the table being queried, but now I can't find it. Am I misremembering?

--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
Post #1567905
Posted Tuesday, May 6, 2014 6:56 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 4:09 PM
Points: 21,252, Visits: 14,960
hisakimatama (5/1/2014)
Whew, busy times at work lately. I've been out of The Thread for a good bit .

Anyone else from The Thread planning to attend this week's SQL Saturday in Atlanta? I noticed that Grant and Jason are both presenting a session there; I'll definitely be attending both! It's the first time I'll be at a programming-based activity, so I'm giddy about loading up with plenty of knowledge


Better late than never - but hope you enjoyed the event.

Hope you enjoyed my session as well. Not sure if we had a chance to meet. Plenty of people stopping me.




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1567916
Posted Tuesday, May 6, 2014 7:45 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 4:44 AM
Points: 983, Visits: 1,623
Stefan Krzywicki (5/6/2014)
I thought I remembered a discussion here months ago about NOLOCK possibly returning bad data even when there's no changed to the table being queried, but now I can't find it. Am I misremembering?


NOLOCK can cause bad data (duplicate and/or missing) even with no changes being made to the table. It is unlikely, but possible. The reasoning mentioned was that SQL can decide to move a page in the middle of your read for Storage Optimization reasons and you would miss that page in the read. Or that you would read the page twice. I don't have the reference, unfortunately, but I think it was Ms. Shaw that pointed that out. I believe that Mr. Moden and maybe Hugo were also in on that discussion.
Post #1567951
Posted Tuesday, May 6, 2014 8:24 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 7:27 PM
Points: 2,752, Visits: 7,186
venoym (5/6/2014)
Stefan Krzywicki (5/6/2014)
I thought I remembered a discussion here months ago about NOLOCK possibly returning bad data even when there's no changed to the table being queried, but now I can't find it. Am I misremembering?


NOLOCK can cause bad data (duplicate and/or missing) even with no changes being made to the table. It is unlikely, but possible. The reasoning mentioned was that SQL can decide to move a page in the middle of your read for Storage Optimization reasons and you would miss that page in the read. Or that you would read the page twice. I don't have the reference, unfortunately, but I think it was Ms. Shaw that pointed that out. I believe that Mr. Moden and maybe Hugo were also in on that discussion.


Awesome, thanks. I was starting to think I'd remembered it all wrong. I read an article about it at the beginning of the year, but haven't been able to find it since. Now I just need to find the reference.


--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
Post #1567979
Posted Tuesday, May 6, 2014 8:24 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:58 PM
Points: 42,466, Visits: 35,532
No, it was not me that pointed it out, because for a page split to occur, there must be an insert/update operation occurring. SQL doesn't randomly, when it's bored, move pages around in tables.

If there are no concurrent changes occurring, then page splits cannot occur (they occur when an insert/update doesn't have enough space on the page) and it's page splits which cause the duplicate rows/missing rows under read uncommitted.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1567980
Posted Tuesday, May 6, 2014 8:34 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 7:27 PM
Points: 2,752, Visits: 7,186
GilaMonster (5/6/2014)
No, it was not me that pointed it out, because for a page split to occur, there must be an insert/update operation occurring. SQL doesn't randomly, when it's bored, move pages around in tables.

If there are no concurrent changes occurring, then page splits cannot occur (they occur when an insert/update doesn't have enough space on the page) and it's page splits which cause the duplicate rows/missing rows under read uncommitted.


So maybe I did remember it wrong? Maybe it is just that if a split has occurred, NOLOCK can return bad data, even if the split happened awhile ago? From the reading I've been doing if the table is static, there's no point in NOLOCK anyway because locks that it avoids won't be happening?


--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
Post #1567986
Posted Tuesday, May 6, 2014 8:40 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, July 25, 2014 3:12 AM
Points: 1,610, Visits: 5,482
Isn't the thing with using NOLOCK on a table that isn't being updated that it effectively becomes a complete no-operation? If the table isn't being updated then no locks will be being taken anyway.
Post #1567990
Posted Tuesday, May 6, 2014 8:40 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 4:58 PM
Points: 42,466, Visits: 35,532
Stefan Krzywicki (5/6/2014)
Maybe it is just that if a split has occurred, NOLOCK can return bad data, even if the split happened awhile ago?


A scan under read uncommitted can return incorrect information if a split occurs *during* the scan because the scan is in allocation order and the new page can have resulted in rows being moved from in front of the current point of the scan to behind it or vis versa.

Can't occur in any other isolation level, because in any other isolation level allocation order scans are only permitted if a full table lock is held (and hence pages can't be splitting)

From the reading I've been doing if the table is static, there's no point in NOLOCK anyway because locks that it avoids won't be happening?


Pretty much. You avoid the cost of requesting locks, but that shouldn't be a noticeable cost.



Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1567992
« Prev Topic | Next Topic »

Add to briefcase «««4,3834,3844,3854,3864,387»»»

Permissions Expand / Collapse