Subject | what actually does the index statistics work |
---|---|
Author | Nick Upson |
Post date | 2007-01-26T15:09:53Z |
If I use the SP below to rebuild all index statistics which process
actually does the work. I could see that it could be either the
process that runs the SP (which is what I actually want) or it could
be the next process to try and use an index (similiar to GC), or its
probably something else I haven't thought of.
ALTER PROCEDURE PR_SYS_CALCSELECTIVITY
AS
declare variable IDX VARCHAR(50);
declare variable STMT VARCHAR(75);
begin
FOR SELECT RDB$INDEX_NAME
FROM RDB$INDICES
INTO :IDX
DO
BEGIN
STMT = 'SET STATISTICS INDEX ' || :IDX;
EXECUTE STATEMENT :STMT;
END
end
actually does the work. I could see that it could be either the
process that runs the SP (which is what I actually want) or it could
be the next process to try and use an index (similiar to GC), or its
probably something else I haven't thought of.
ALTER PROCEDURE PR_SYS_CALCSELECTIVITY
AS
declare variable IDX VARCHAR(50);
declare variable STMT VARCHAR(75);
begin
FOR SELECT RDB$INDEX_NAME
FROM RDB$INDICES
INTO :IDX
DO
BEGIN
STMT = 'SET STATISTICS INDEX ' || :IDX;
EXECUTE STATEMENT :STMT;
END
end