multiple user question
Posted in 1996
Hi, Currently, our project is using single thread connect to DB. And we are going to use 9 current connections . I know current users will cause some problem the single connection won't has. Can someong give me some advices when switch from single connection to multiple connections. What important things I should be aware of. Fro example, the Locking strategy, Application logical problem.... Table INSERT/UPDATE/DELETE problem...... We are using INFORMIX-OnLine Version 7.13.UC1 on HP-UX hag B.10.01 D 9000/856. All codes are in SPL on Server side.. The users are using VB on client side. My few notices: 1, I want user get share lock when SELECT. exclusive lock when UPDATE/INSER/DELETE. I know SELECT.....FOR UPDATE, but only for ESQL/C, the SPL can only use UPDATE CURSOR, and I don't know how to use it for UPDATE/INSERT/DELETE? 2, Set table to Row lock is better than Page lock? 3, Set Lock Mode to wait or not wait? 4, At the transaction level, use "set transaction isolation level" or use "set isolation level"? Dirty read, Repeatable read or committed read? 5, Some cases, For Example, if one stored procedure use "new = MAX(fieldname) + 1;" statement, if two users access this stored procedure at the same time, then one user of them will get the wrong new value. How can I avoid this kind of things? 6, How to avoid deadlock? Thanks. please reply to sss@bart.sdit.com.tw Scott sss@bart.sdit.com.tw