Subject Re: [firebird-support] problem with converting tables
Author Dmitry Sibiryakov
On 15 Jul 2005 at 11:24, mat wrote:

>One of my query takes really a lot of time, generally i can say that
>it's impossible to execute it:) it goes below:
>
>update correspondence
>set arc = 1 where id in (select correspondence_id from
>correspondencelog where arc = 1); commit;

I'd suggest execute (almost) this query in Stored Procedure.
Something like this:

For select distinct correspondence_id from correspondencelog where
arc=1 into :somevar do
begin
update correspondence set arc=1 where id=:somevar;
end

May be much faster...
--
SY, Dimitry Sibiryakov.