Grab a pen and notepad, and jot down your answers as you go, then check your answers at the key at the bottom of the page.
Questions
Q1. Which table hint is equivalent to NOLOCK?
- NOHOLDLOCK
- LESSLOCK
- READCOMMITTED
- READUNCOMMITTED
- YOLO
Q2. Fill in the blank.
This statement applies NOLOCK to every table referenced in your session (unless otherwise hinted in the queries).
SET _________ ISOLATION LEVEL READ UNCOMMITTED
Q3. Fill in the blank with a term that describes a phenomenon that only occurs under the read uncommitted isolation level.
Reading uncommitted data is called a _______ read.
Q4. Other “bad data” phenomena that can occur under READ UNCOMMITTED are….
Choose all that apply….
- Un-split reads
- Non-repeatable reads
- Phantom reads
- Backward reads
- Hopeful reads
Q5. Fill in the blank
Creating an _______ can often reduce or eliminate blocking.
Q6. Which lock type does a query using NOLOCK still require against a table?
- LCK_M_RIn_X
- LCK_M_U
- LCK_M_SCH_S
- LCK_M_SCH_M
Q7. Which type of pages are used by an allocation order scan?
- XTP Pages
- PFE Pages
- B+ Tree Pages
- IAM Pages
Q8. If you want to get an allocation order scan, you have to be willing to read uncommitted data.
- True
- False
Q9 The NOLOCK hint in queries is ignored if you enable Read Committed Snapshot Isolation (RCSI) for a database.
- True
- False
Scroll down for the answer key :point_down:
Answer Key
- A1. 3. READUNCOMMITTED
- A2. TRANSACTION
- A3. dirty
- A4. 2. non-repeatable reads, 3. phantom reads
- A5. index
- A6. 3. LCK_M_SCH_S
- A7. 4. IAM
- A8. 2. False
- A9. 2. False