Hi Mike,
Thank you for sharing the customised script. Nice script indeed. I have not checked and benchmarked it for performance thoroughly, But, it is based on systables.nrows column value. The script generates statistics related statements, only if the column contains a non-zero value.
For a newly created and loaded table, systables.nrows shows zero value unless, an update statistics low is fired on that table. For a freshly imported database, using dbimport one need to issue:
update statistics low for table;
statement, before firing this script, inorder generate the statistics related statements.
Thanks once again.
Regards,
Shriyan