Hello Everyone;

I have a Sybase 8.0.2 transaction system database that I did not
create, however I must maintain. It appears to slow down if I leave it
running for ~12 business days. I found if I did a "Create Statistics"
function against tables related to the slowdown, that it helped keep
everything running. I wrote the procedure below and have it running every
Saturday night about 3 am as a DB event. Is there any reason that I
shouldn't do this? Is there a better way to tune the database of course
assuming that everything else is reasonably correct?

ALTER procedure DBA.dbtune()
for tableName as tableNameSC dynamic scroll cursor for
select table_name from SYS.SYSTABLE where
/*Creator = 1 is DBA created tables*/
table_type = 'BASE' and creator = 1 order by table_name asc do
message table_name || ' started.' type info to client;
execute immediate 'CREATE STATISTICS ' || table_name;
message table_name || ' completed.' type info to client end for

Thanks for your assistance,

Billy Willoughby