Subject Re: [firebird-support] Recomputing index statistics and stored procedures
Author Dimitrios Chr. Ioannidis
Rick Hi,

Rick Debay wrote:
> When a stored procedure or trigger is compiled, are the plans for its
> queries chosen at that time? If so, they should be recompiled after
> recomputing index statistics.
> In that case, does anyone know how to recompile all stored procedures
> and triggers, in a similar fashion to the procedure below?


from "Firebird magazine" - Issue 1 - page 5 ;)

----------------------------------------
create procedure SETSTAT
as
declare variable s VARCHAR(200);
begin
for select rdb$index_name
from rdb$indices
into :s
do
begin
s='SET STATISTICS INDEX '||s||';';
execute statement :s;
end
suspend;
end;
----------------------------------------


Regards,

--
Dimitrios Chr. Ioannidis
ArteSOFT, Ltd
+30 2310 672982-3