Unix Technical Forum

Restores and Update Statistics

This is a discussion on Restores and Update Statistics within the Sybase forums, part of the Database Server Software category; --> We're in the process of migrating our Informix DB to Sybase 12 running on Windows 2000 Server (apologies for ...


Go Back   Unix Technical Forum > Database Server Software > Sybase

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 03:52 PM
LizP
 
Posts: n/a
Default Restores and Update Statistics

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 03:52 PM
Bret Halford
 
Posts: n/a
Default Re: Restores and Update Statistics

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


-bret
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 03:52 PM
Mariano Corral
 
Posts: n/a
Default Re: Restores and Update Statistics

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:35 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com