Re: Smart upd_stats routine
Posted in 2000
"Carlson@WHSmith" wrote: > > Paul Watson wrote: > > > > > ---- you wrote: > > > > IDS 7.30.uc7 > > > > HPUX 10.20 > > > > > > > > Currently, my update statistics scripts update all tables and I run it > > > > every night, just in case <?>. However, the size ( and number ) of my > > > > tables is increasing, and update statistics runs quite a long time. > > > > Don't run it on your static/reference tables > > . . . which are quite (relatively) small . . . hmmmmmm, might save a bit > of time. > > > > > Frankly, I'd like to run update statistics a bit smarter. Ultimately, > > > > I'd like to run against all tables once a week, and as needed between > > > > weekly runs. Only problem is that I haven't been able to accurately > > > > define when a table's distribution plan "needs" to be updated. I could > > > > always go for changes (actual or percentage) to number of rows or number > > > > of pages as a means, but that method doesn't seem smart enough. > > > > IMHO this is a know your data - you should know which tables are taking > > most > > of the activity, if you don't then the developers should > > I do know, but I'm just looking for a systemic way, whether it's > triggered by a certain increase in pages, rows, etc. I don't really > want to hardcode the tables into a "create upd_stats" script. I thought the normal method was to only update stats for tables that have had rows inserted, updated or deleted, based on the stats in sysmaster. Cheers, -- Mark. +----------------------------------------------------------+-----------+ | Mark D. Stock mailto:mdstock@mydas.freeserve.co.uk |//////// /| | http://www.informix.com http://www.informixhandbook.com |///// / //| | http://www.iiug.org +-----------------------------------+//// / ///| | |What year 2000 bug? year 2000 bug? |/// / ////| | |year 2000 bug? year 2000 bug? year |// / /////| | |2000 bug? year 2000 bug? year 1900 |/ ////////| +----------------------+-----------------------------------+-----------+