In article <4aq3kt$nia@cantua.canterbury.ac.nz>, E.Havelaar@Regy.Canterbury.Ac.NZ (Ed Havelaar) writes: �Suppose I have a program that takes ages to run and keeps a read-only �transaction open for its duration (e.g. to perform calculations on all 100000 �records in a table), Every now and again, I want to assign an account number. �This involves starting a read-write transaction for as short a time as �possible. How can I do this without terminating my hours-long �read-only transaction and somehow figuring out where and how to recommence it? what version of Rdb are you using? I'll assume that you are using some relatively current version (6.1). how are the records in your original readonly transactions selected? if they are based on some unique, sorted, ascending key, then you could just keep track of the last key that you processed, perform the read-write transaction, and then start up at the record with the key greater than your last key. if you are only gonna do a peak of 400 inserts per hour, I'd not bother with the lock value block or any of the performance 'enhancers'. this is a pretty low insert rate. the trigger would be a really nice way to do the counter. the folk lore of triggers being slow probably isn't completely accurate, they'll execute at the same speed as any old sql statement. -- the opinions expressed here are my own and hardly ever reflect those of Oracle Corporation.