Locking and Isolation Levels
Posted in 1998
We have an application that adds records to a table. It runs constantly and uses a stored procedure. The first thing it does is Lock Table in Exclusive Mode At night we have a purge process that drops records from this same table. It also does a Lock Table in Exclusive Mode. If the many inserts are occuring the delete program runs for hours. If few are occurring it can run in a few minutes. Obviously both transactions cannot lock the same table which I am assuming is the cause of the performance problem. My Questions: 1. Should we be aquiring an exclusive table lock in order to insert a record? 2. If not what if any locks should we be setting? These transactions will not be adding/deleting the same rows. 3. Can isolation level Cursor Stability control this? 4. What are the default settings for locking and isolation? TIA for all your answers Roger.Bruening@Metrokc.gov -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum