Subject | Re: [firebird-support] Recomputing index statistics and stored procedures |
---|---|
Author | Dimitrios Chr. Ioannidis |
Post date | 2005-06-21T16:19:06Z |
Rick Hi,
Rick Debay wrote:
----------------------------------------
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
Rick Debay wrote:
> When a stored procedure or trigger is compiled, are the plans for itsfrom "Firebird magazine" - Issue 1 - page 5 ;)
> 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?
----------------------------------------
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