RE: update statistics
Posted in 2007
Of course you could always go to the IIUG software depot and get Art's do_stats program... --EEM -----Original Message----- From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] On Behalf Of Tilman Model-Bosch Sent: Monday, March 05, 2007 7:22 AM To: Bill64bits Cc: informix-list-bounces@iiug.org; informix-list@iiug.org Subject: Re: update statistics informix-list-bounces@iiug.org wrote on 03/05/2007 12:47:55 AM: > The IBM web page at ... > ... says to update statistics thusly: > > 1. Run UPDATE STATISTICS LOW on all tables in the database. > > 2. Run UPDATE STATISTICS MEDIUM on all columns which are in an > index, but are not the first column of any index. > > 3. Run UPDATE STATISTICS HIGH on all columns which are the first > column in an index. > > 4. Run UPDATE STATISTICS on all stored procedures. > > I thought someone on this group propounded the proper sequence as > 1. medium on all tables > 2. high on heads of indexes > 3. medium on tails > > Which is correct? I don't think right or wrong is in question here. It really depends on you application and your data and needs to be adjusted in special cases. As a general approach I prefer - updat stats low on all tables. - updates statistics high for leadin index cols with distributions only - updates statistics medium for non-leadin index cols with distributions only If you ommit the 'distributions only' update stats med or high will implicitly perform a low , too, which is probably overdone (as we did the low just before). However, for particular situations a taylored update statistics approach might be necessary to get good performance. Rgds Tilman _______________________________________________ Informix-list mailing list Informix-list@iiug.org http://www.iiug.org/mailman/listinfo/informix-list