cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to dump/load statistics

Former Member
0 Kudos
548

Sybase version: 15.x

------------------------------

Good morning all,

I'm working in a team in charge of upgrading our software. As you can imagine, the target is to have the process executed as fast as possible.

One suggestion was to:

1. One or two weeks before the Go-Live, execute an upgrade dress-rehearsal and export the "statistics"

2. During the Go-Live, import the statistics to speed-up the process.

I'd like to know if it's possible to export some 'statistics' and import them? is it just a matter of dump load sysstatistics and systabstats?

Thanks for your valuable feedbacks

Simon

Former Member
0 Kudos

Hi Simon,

Mark is correct it is not support to do direct update to system table.

Some more information is that load optdiag from different version and different platform

only have limited support.

Changing statistics with optdiag

Some curiosa optdiag use bulk insert to insert the values in to the system tables this mean you need to handle the structure of the table at the client so we would not recommend to do this with normal BCP then the extra complexity is that system table change between version so great care have to be taken if this load is between different versions.

Niclas

Accepted Solutions (0)

Answers (2)

Answers (2)

kevin_sherlock
Contributor
0 Kudos

Not sure I totally understand the situation.  You are upgrading Sybase software?  If so, current statistics aren't affected, and will be there after the upgrade.  No need really to necessarily worry about out-of-date statistics after an ASE upgrade.  Maybe you could expand more regarding your concern about statistics post upgrade?

In any case, yes, the "optdiag" tool is the right choice to import "column" level stats (those statistics found mostly in sysstatistics).  The table/index level stats (mostly found in systabstats) are kept in ASE memory for the most part and flushed to systabstats periodically.  So, importing table/index level stats is possible, but they will just be over-written by ASE very quickly with the "actual" statistics from the tables/indexes.  As others have mentioned, this works best when the input statistic's ASE version is the same as the target ASE version.

Former Member
0 Kudos

Hi Kevin,

No we're not upgrading Sybase software. Our software upgrade is taking a lot of time for certain part, the idea to speed-up the process would be to migration the production DB few days before the go-live. We would then extrac the stats from this DB and 'ímport' them during the GO LIVE in order to shorten the process.

Former Member
0 Kudos

Thanks Niclas and Mark for your answers.

I'll look at the optdiag documentation.

Simon