Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

anyone have an automagical update statisitics script generator?

Status
Not open for further replies.

WiccaChic

Technical User
Jan 21, 2004
179
US
I have seen an example of such a thing written in 4gl, but I was wondering if anyone had something written in sql and/or a shell scripting type language? I do not speak 4gl and if I use such a thing I want to be able to tweak and customize it and I can do sql and corn/korn/sh.
-thanks
 
Hi WiccaChic,

Email me & I'll send you the ksh script I use

michael.lasky@niagaracounty.com
 
Michael:

Have you submit your script to the FAQ?

Ed
 
Hi Michael,

Yes, Please post your script in the FAQ area of this Forum if you don't mind. Let rest of the members benefit from it.

Regards,
Shriyan
 
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
 
Hi Shriyan,

People helping people, that's what it's all about, right?

Take care - Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top