Skip to content

Tag Archives: sqlserver

Persisting Computed XML

It’s possible to define an XML column as a computed column. And in most cases I think it would make sense to persist the column to save doing all that work again. As Bob Beauchemin points out there’s a trick to doing it.

The first thing you need is a user defined scalar function to [...]

Heap locking under Serializable Transactions

Tables without a clustered index store their data in a Heap data structure. The (in row) data is added to the heap as its encountered without any ordering, rather than ordering by the columns in a clustered index. This makes finding particular rows a little tricky and a lot slower as there is normally no [...]

How long do READ COMMITTED transactions hold shared locks

This was one of the questions I did not answer in my previous look at Shared locks in standard transaction isolations. In that post the lowest level lock the READ COMMITTED test took was an Intent Shared (IS) lock on the single data page in the table. But I do remember reading somewhere that READ [...]

Discovering the Isolation Level

A few times I’ve wondered how to detect the ISOLATION level and have discovered a few.

DBCC USEROPTIONS

DBCC USEROPTIONS

Set Option Value ——————————————————————————- textsize [...]

Locking without a Transaction

Well, not really without a transaction. But I was wondering what locking schemes are used when a query is run outside of an explicit (BEGIN / COMMIT) transaction. What impact does changes to the isolation level have?

The simple answer is its the same when compared to the locking examples I previously identified when running under [...]