Database Performance and Tuning: Query Tuning and Locking