Subject Re: Index Selectivity maintenance
Author Ian A. Newby
Thanks for the idea Martijn,

Heres the stored procedure to do the job!

CREATE PROCEDURE SYS_RECALC_SELECTIVITY
returns (indexname char(31))
AS
begin
for select rdb$index_name from rdb$indices into :indexname do
begin
execute statement 'set statistics index ' || :indexname;
suspend;
end
end

Regards
Ian Newby