Re: Locking and Isolation Levels
Posted in 1998
I'm not sure of what your intending to do. Informix supplies row level locking. If you have a pending transaction that inserts, updates, or deletes a row no other session can modify that row until the transaction completes. What is the prge process supposed to do? Why did you see a need for an exclusive table lock? The default isolation level depnds on whether your database is logging or not. If you are not logging it is dirty read - if you are logging it is committed read. The default for logging is no and is set when you create the database. You can modify the logging mode of a database after it is created if you change your mind. -Bill > > 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