Re: ? SET ISOLATION
Posted in 1995
It is most likely because one or both of the processes is reading rows other than through an index, causing it to touch (and therefore lock, or get locked out of) rows it isn't really interested in. Build a composite index on the exact filter criteria of the query/queries and the problem is less likely to happen. Better still if the index is UNIQUE and you reference all parts of it in each query, because then (and only then) you will never try to read rows other than the ones you actually want. The other thing you could try is to remove the FOR UPDATE. That way you will only acquire share locks and as many people can have them as you want - so long as no-one has or wants an exclusive lock. Lastly you may have come up against the 'Adjacent Key Locking' feature of pre-Version 6 OnLine, but I'd say this is the last place to look. akent@cix.compulink.co.uk (Andy Kent) ------------------------------------------------ Freelance Informix Database Specialist, Redland, Bristol, England