Re: Q: Update statistics
Posted in 1998
On Thu, 10 Sep 1998, June Tong wrote: > Art S. Kagel wrote: > > Indeed while ODS 5.0x did lock a table during update stats 7.xx only > > acquires an instantaneous lock on the sysdistribs table when it finally > > inserts the resulting statistics records for MEDIUM and HIGH. LOW and > > HIGH do the same to the table's systables record when it is updated. > > Hmmm, I don't think 5.0 locked any tables during UPDATE STATS either. As I > recall, you'd have to go back to 4.x to find any table locks during UPDATE > STATS. To the best of my knowledge, 5.0 would read a table, then lock > systables/syscolumns/etc just long enough to update the rows pertaining to > that table, release those locks, and move on to the next table. 4.something > (and I don't remember what the 'something' was) would lock a table while it > was being read. In 5.0 (and for all I know, 7.x), IFF you run UPDATE STATS > within a transaction, the locks on the system catalogs are held for the > duration of the transaction, as locks always are. Therefore, you don't want > to run UPDATE STATS within a transaction. Doesn't that make it a trifle difficult to run UPDATE STATISTICS in a MODE ANSI database? And could you actually rollback an UPDATE STATISTICS in a MODE ANSI database? Yours, Jonathan Leffler (jleffler@informix.com) #include <witticism.h> Guardian of DBD::Informix v0.60 -- http://www.perl.com/CPAN Informix IDN for D4GL & Linux -- http://www.informix.com/idn