Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Ask yourself the following question: Would it be bad if someone were to INSERT a new row into your data while your transaction is running? Would this interfere with your results in an unacceptable way? If so, use the SERIALIZABLE level.</p> <p>From <a href="https://msdn.microsoft.com/en-us/library/ms173763.aspx" rel="noreferrer">MSDN regarding SET TRANSACTION ISOLATION LEVEL</a>:</p> <blockquote> <p><strong>SERIALIZABLE</strong></p> <p>Places a range lock on the data set, preventing other users from updating or inserting rows into the data set until the transaction is complete. This is the most restrictive of the four isolation levels. Because concurrency is lower, use this option only when necessary. This option has the same effect as setting HOLDLOCK on all tables in all SELECT statements in a transaction.</p> </blockquote> <p>So your transaction maintains all locks throughout its lifetime-- even those normally discarded after use. This makes it appear that all transactions are running one at a time, hence the name SERIALIZABLE. Note from <a href="http://en.wikipedia.org/wiki/Isolation_(database_systems)" rel="noreferrer">Wikipedia regarding isolation levels</a>:</p> <blockquote> <p><strong>SERIALIZABLE</strong></p> <p>This isolation level specifies that all transactions occur in a completely isolated fashion; i.e., as if all transactions in the system had executed serially, one after the other. The DBMS may execute two or more transactions at the same time only if the illusion of serial execution can be maintained.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload