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------------------------------
Original Message:
Sent: Mon April 22, 2024 11:24 AM
From: Frank Yunyao Qu
Subject: Question of dostats
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