Re: Update Statistics
Posted in 1993
> > update the table information so that RDSQL has current information.' > > Does this mean that, if I have a table of, say, 1 000 000 rows, and > each day 30 000 rows are purged and another 30 000 rows are added, > there is no need to run update statistics as the table size is > relatively constant? Or did this only apply to Turbo, and if so, > what are the other points to consider with Online ? From what I know, one of the main reasons to run update statistics is to not only update the number of rows in the system catalogs, but to update the min and max index values. I really dont understand why this information cannot be kept up to date at all times. I'm guessing there is a performance hit, but if this information was kept in shared memory, it should be pretty fast and painless. But then, I say this not knowing the internals. > I ask this because it sometimes takes up to an hour to run this > utility in the field (when running it once a week), during which the > database is locked - I guess this would suggest that we should > balance 'running it more often and locking for less time' against > 'running it less often and locking for more time' ? Does any-one > know why it has to lock the entire database? You can run update statistics on a particular table. -- Naomi Walker (aka N7FSA) naomi@anasazi.com Phoenix, Arizona To get the full value of joy, you must have someone to divide it with. ---Mark Twain