Re: Locking problem
Posted in 1994
Topics: Performance & Tuning, SQL Development & Query Writing, Transactions, Locking & Isolation, Jobs, Consulting & Announcements
SAM (sghofh@netcom.com) wrote: : Hi, : I am facing a locking problem. The scenario is as follows: : We are using informix online 5.1, and isolation level is committed read. : We are declaring a cursor for update, and unfortunately the where caluse of : select statement has not been constructed properly and engine is doing a : sequential scan, instead of using a sorted index. I am opening the cursor : and when we are fetching the first row from the cursor, set explain on is : showing it has acquired 26,000 locks, which I presume, rows has been : selected by the where clause. : My question is, Why it is holding the lock on the first fetch from the : cursor. In case of committed read, it should lock the rows as and when I : am fetching the rows. : Any help is apprecaited. : Swapan Ghosh : sghosh@consilium.com I am not familiar with Informix's fetching mechanism, but, I would like to know what lock mode your table is defined. Is it lock by page? or lock by row? - Erik Chong ___ \\ /\\ "Don't email to me, I am a wanderer using other's address." \\/ \\__________________________________________________________________