Question of dostats
Posted in 2024
Summary
Frank Yunyao Qu asked whether dropping distributions with UPDATE STATISTICS LOW is needed before running dostats daily. Art Kagel said neither is needed; with auto stats enabled use --force to override, and he runs dostats without --force on weekdays and with --force at weekends. A TCP connection is preferred, since dostats may use two connections that shared memory cannot give.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
Topics:
General Discussion
Hi, Art,
We use Dostats to update stats daily.
The basic steps of the cronjob are,
Step 1) update statistics low drop distributions
Step 2 ) dostats -d mydatabase
Question,
Is step 1 (drop distribution) needed before running dostats?
Thanks
Frank
↪ replying to Frank Yunyao Qu
No. It is not necessary to do an UODATE STAUSTUCS LOW... before running dostats. It handles that for you in different ways.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Frank Yunyao Qu
OH, and there is no reason to drop distributions either. If you disable auto stat mode then dostats will update all tables for all pertinent columns. If you have auto stats enabled, just add the --force option to dostats to override the auto mode.
I usually set up my clients to leave auto stats enabled but run dostats without --force daily during the week and with --force over the weekend. That will minimize runtime during the week while generating fresh stats for highly active tables once or twice during the week when needed, but force fresh stats weekly for every table.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
↪ replying to Art Kagel
Thanks Art.
Another question,
Is TCP connection preferred to other type of connection (e.g, shm, ssl, ....) for running dostats ?
Thanks
Frank
↪ replying to Frank Yunyao Qu
Yes. Many dostats rune used two connections egging you cannot do over a shared memory connection. There is an option to use a shared memory connection but then you can only process one database per run.
Art
------------------------------
Art S. Kagel, President and Principal Consultant
ASK Database Management Corp.
www.askdbmgt.com
------------------------------
Glossary