Questions
Q1. Which isolation level allows both non-repeatable reads AND phantom reads to occur?
- Read committed
- Serializable
- Snapshot
- Repeatable read
Q2. Which isolation level allows phantom reads, but NOT non-repeatable reads to occur?
- Read committed
- Repeatable read
- Serializable
- Snapshot
Q3. For disk-based tables, which type of lock protects against phantoms?
- Intent Shared Locks
- Update Locks
- Key Range Locks
- Deadlocks
Q4. Which best describes the locking pattern for a scan in a SELECT query run under the read committed isolation level?
- Shared locks are generally held just long enough to process each row
- Shared locks are generally held for the duration of the entire transaction
- Key range locks are generally held just long enough to process each row
- Key range locks are generally held for the duration of the entire transaction
Q5. Which best describes the locking pattern for a scan in a SELECT query run under the repeatable read isolation level?
- Shared locks are generally held for the duration of the entire transaction
- Key range locks are generally held just long enough to process each row
- Key range locks are generally held for the duration of the entire transaction
- Shared locks are generally held just long enough to process each row
Q6. Fill in the blank with the most logical word
If you raise your isolation level to repeatable read or serializable and are using disk-based tables, you risk increased _________ ing and deadlocks.
Q7. Fill in the blank with the correct isolation level
An “optimistic” alternative to the serializable isolation level which uses row versioning and timestamps to provide a transaction data consistent with the first time a statement accesses data is _______ isolation.
Q8. A query referencing disk-based tables can use more than one isolation level.
- True
- False
Q9. The HOLDLOCK table hint is equivalent to
- Read committed
- Repeatable read
- Serializable
- XLOCK
Q10. The demo in this course showing a non-repeatable read used which pattern in its execution plan?
- Bookmark lookup
- Lock escalation
- Lazy spool
- Index intersection
Scroll down for the answer key :point_down:
Answer Key
- A1. 1. Read committed
- A2. 2. Repeatable read
- A3. 3. Key Range Locks
- A4. 1. Shared locks are generally held just long enough to process each row
- A5. 3. Shared locks are generally held for the duration of the entire transaction
- A6. block
- A7. snapshot
- A8. 1. True
- A9. 3. Serializable
- A10. 4. Index Intersection