Subject AW: [firebird-support] Question about better performance Query
Author Olaf Kluge
Hello again,



for all users with the same "problem":



I have created an update-trigger:



AS

begin

if(new.status = 5) then

begin

if (not exists (select 1 from t_pictures where status < 5 and kd_id =
new.kd_id

and li_id = new.li_id)) then

update t_pictures set status = 6 where kd_id = new.kd_id and li_id =
new.li_id;

end

end



Now I only read the first record with status 6, after the feedback of the
pc-program I delete all pictures with status 6



No performance-problem at the time!



Thanks for your help.





PS: If there is anything to do for even better performance, thanks for your
advices.



Best regards



Olaf







[Non-text portions of this message have been removed]