>Yes, I set empty off in all the programs, and explicitly did so from the command window when I checked ?Empty(cdr.rate)
You don't have an active index on the crd.processed field, do you? Indexes on logicals usually don't help much, and if you're basing your SCAN condition on it, you're changing the value in the loop!