Subject Re: Updating index statistics
Author Adam
Hello Group,

FYI, here is the procedure:

---
CREATE OR ALTER PROCEDURE SETALLSTATISTICS
AS
DECLARE VARIABLE INDEXNAME CHAR(31);
DECLARE VARIABLE STMT VARCHAR(300);
BEGIN
FOR
SELECT RDB$INDEX_NAME
FROM RDB$INDICES
INTO :INDEXNAME
DO
BEGIN
STMT = 'SET STATISTICS INDEX ' || INDEXNAME;
EXECUTE STATEMENT STMT;
END
END
^
---

To update your statistics at any time, simply open iSQL or equivalent
and run.

---

Execute Procedure SetAllStatistics;
Commit;

---

Weird particular site having slow query that runs fine in QA problem
solved!

Adam