Until OE 12 it's not possible to trap a STOP condition. A STOP is just that, a stop.
My question would be, why are you wanting to log this? And why aren't you handling this yourself?
FIND myrec EXCLUSIVE-LOCK NO-WAIT NO-ERROR.
IF NOT AVAILABLE myrec THEN
IF LOCKED (myrec) THEN
Is the primary index a generated key of some kind? How is this handled in the normal application? If the triggers are used, then just exclude the key value from the copy to the database and the triggers will still fire and assign these automatically.
Whatever the case, you can build a query on...
This is from the Chrome editor so not syntax checked, but it might help! Set myString to be one of the values with the TM in.
DO i = 1 to LENGTH(myString):
DISPLAY SUBSTRING(myString,i,1) ASC(SUBSTRING(myString,i,1).
That should give you the ASCII value of each character in the string...
When preparing a query tuning talk a few years ago I also found that I had to set the CACHE property to get the expected reads on some queries. I did do some research then but didn't find another solution. Are you able to ascertain that the CACHE property is definitely causing issues...
If you're contemplating a dump and load then make sure you're on the very last service pack of 10.2B. You will then have a number of bells and whistles at your fingertips to improve the speed. Particularly the index build. I did a 9GB Database in less than an hour the other week.
In terms of...
Without looking at the project it might be quite hard to debug this. I suspect there may be another setting in play that is also compiling. It seems counter-intuitive, but have you tried disabling the compile on save option and see if you still get a compile on save?