Subject Re: [firebird-support] Re: Violation of UNIQUE KEY constraint during UPDATE
Author Ann W. Harrison
Milan Babuskov wrote:
>>The PK search is quick
> Generally, yes. But in this case it has to be done for *each* record.
> AFAIU, that means that it has to locate each record. A simple "natural"
> update also touches all records, but it doesn't even bother with index
> so it should be quicker. Right?
Yes, but in this case the natural update doesn't work. The PK search
will be fast because of caching - data is sure to be in cache, as is
most of the index after the first lookup.