UPDATE STATISTICS
Posted in 1999
Topics: General Discussion
Hello again everyone/ Another quick question (I hope) I'm slightly confused about the UPDATE STATISTICS command. If I do an UPDATE STATISTICS HIGH FOR TABLE tablename (col1, col2) then do an UPDATE STATISTICS MEDIUM FOR TABLE tablename (col3) then do and UPDATE STATISTICS LOW for tablename does the last UPDATE STATISICS command override the first two ? In short the order in which the commands are executed matter ?? Rekaish Bhardwaj Computer Answers International Limited 9 The Courtyard Warwick Road Solihull West Midlands B91 3DA United Kingdom Tel: +44 (0) 121 703 0300 Fax +44 (0) 121 703 0399 Mobile: +44 (0) 498 765424 Email: rekaishb@compans.com
Rekaish Bhardwaj wrote: > > Hello again everyone/ > Another quick question (I hope) > I'm slightly confused about the UPDATE STATISTICS command. > > If I do an UPDATE STATISTICS HIGH FOR TABLE tablename (col1, col2) > then do an UPDATE STATISTICS MEDIUM FOR TABLE tablename (col3) > then do and UPDATE STATISTICS LOW for tablename > > does the last UPDATE STATISICS command override the first two ? > In short the order in which the commands are executed matter ?? No, however, the second, MEDIUM, command does much of the work that the third, LOW, command does as does the first, HIGH, command. You should add the DISTRIBUTION ONLY clause the the first two commands if you will be running the LOW anyway. The LOW would only undo the work of the prior statements if it had included the DROP DISTRIBUTIONS clause. Art S. Kagel