Subject Re: [ib-support] slow update
Author Ann W. Harrison
At 05:58 PM 3/2/2002 +0100, Duilio Foschi wrote:
>I found this update (done from WISQL on local FB) surprisingly slow:
>
>update mv_li set cod_cau=(select cod_cau from mv_hd where
>v_hd.n_mov=mv_li.n_mov)
>
>(There is already an index on mv_hd(y_mov,n_mov) ).

Changing the index to be on (n_mov, y_mov) would help since
Firebird can't use the second part of a compound index if
the first part is unknown.


Regards,

Ann
www.ibphoenix.com
We have answers.