RE: update statistics
Posted in 2007
I have looked at that, but I think it was in korn shell or something.We are totally 'doze' now so I wrote a script myself as a .vbs to generate sql such as you laid out,except that I had the low and medium reversed.If do_stats were in Perl or vbs or powershell, I would have used that.> Subject: RE: update statistics> Date: Mon, 5 Mar 2007 08:27:56 -0600> From: eemills@nationalbeef.com> To: informix-list@iiug.org> > 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> _______________________________________________> Informix-list mailing list> Informix-list@iiug.org> http://www.iiug.org/mailman/listinfo/informix-list