Subject | Re: [firebird-support] Re: Violation of UNIQUE KEY constraint during UPDATE |
---|---|
Author | Ann W. Harrison |
Post date | 2005-08-05T17:58:12Z |
Milan Babuskov wrote:
index (less efficient than the sort alternative) is faster than the
double update that was also proposed.
Regards,
Ann
> Adam wrote:The PK search is quick - and even an index walk to fake a descending
>
>>for select id from tablea order by id desc into :id do
>>
>>The idea being to force the order by for the update. I do not know if
>>this would work at all, but may be worth a try.
>
> It would work, but it is more expensive: one full scan (or index walk if
> you have desc index) + pk search for each record.
>
index (less efficient than the sort alternative) is faster than the
double update that was also proposed.
Regards,
Ann