Skip to content

Instantly share code, notes, and snippets.

@gbritton1
Last active June 14, 2024 13:42
Show Gist options
  • Save gbritton1/a3ccb4333ba2dcce59fd0abf002a0e31 to your computer and use it in GitHub Desktop.
Save gbritton1/a3ccb4333ba2dcce59fd0abf002a0e31 to your computer and use it in GitHub Desktop.
Managing SQL Server Database Concurrency
@pescadorbob
Copy link

One other question from module 4: Read Committed, time 2:54, you say,

"if you tried the same experiment from module 3, read uncommitted with the phantom reads. If you tried it, you'll know that the phantom reads are still there."

Well, I tried the suggested homework, and I didn't get phantom reads. In my test, when doing it with:
TRANSACTION ISOLATION LEVEL READ COMMITTED
READ_COMMITTED_SNAPSHOT OFF

the second

'select * from Orders.Orders;'

blocked because of the row lock on the new Orders insert.

Did you just say that to see who was paying attention, or... did I miss something?

I checked with one of my technical coaches, and he agreed with me that you don't get phantom reads in 'READ COMMITTED' only in 'READ UNCOMMITTED'.

What am I missing?

@gbritton1
Copy link
Author

gbritton1 commented Jun 14, 2024 via email

@pescadorbob
Copy link

Thanks for your prompt reply @gbritton1. Even though this may not be the channel you planned for feedback.

Could you also comment on the phantom reads using READ COMMITTED? I'd like to close out my doubts on that today.

I loved the straightforward way your course lets me explore, hands-on, concurrent behavior using multiple windows. Even one of my technical coaches was impressed because it leaves nothing up to timing chance.

Thanks for your insightful course!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment