I have often found statistics corrupted after a load database.
Apparently, this happened to busy tables, probably because
their statistics were updated while the dump took place.
Many other tables, on the other hand, seemed to have correct
statistics (as Bret pointed, statistics are stored in the
same database and backed-up by the same dump database command).
My advice is to try to schedule a update statistics session
after loading the database, but simply as a secondary task.
After all, only a small percentage of queries are affected
by statistics; so, if you're lucky, you can wait until the
next week-end with unaccurate statistics without noticeable
performance problems.
Regards,
Mariano Corral
Bret Halford) wrote:
> liz.porteous@scottishfriendly.co.uk (LizP) wrote in message news:<8170ed5a.0308270220.3c2cd30a@posting.google. com>...
> > We're in the process of migrating our Informix DB to Sybase 12 running
> > on Windows 2000 Server (apologies for not knowing much about the
> > Sybase software). Our software vendor has advised that when a
> > database is restored, the data distributions generated via the update
> > statistics commands are also restored, and we're looking for
> > confirmation of this.
> >
> > (The way Informix works, once a database is restored, update
> > statistics require to be run separately to update the data
> > distributions.)
> >
> > Do we need to run update statistics separately once a restore has
> > taken place, or are our software vendors correct in their assertions?
> > Is there anything in particular we need to look out for with regards
> > to update statistics when backing up or restoring a database?
> >
> > Thanks for any help.
>
>
> The statistics generated by UPDATE STATISTICS are physically stored in
> the
> sysstatistics table, which becomes part of the dump just like every
> other real
> table in the database (a few tables such as sysprocesses,
> syslisteners, and syslocks are dynamically generated, but these have
> nothing to do with statistics). The statistics will be as accurate
> after the dump as they were before the dump. You really only need to
> worry about updating statistics
> after modifying data in a table.
>
> -bret