Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: exporting / importing Object Stats?

RE: exporting / importing Object Stats?

From: VIVEK_SHARMA <VIVEK_SHARMA_at_infosys.com>
Date: Sat, 15 Oct 2005 10:58:48 +0530
Message-ID: <BBD944BCAC3AB4499DFBAFB1D8AF30201069ED@BLRKECMSG11.ad.infosys.com>

Alex, Wolfgang, List

WOW. Any info on the following, if possible?

We have a Table which is RE-Created Daily with respective Partition names changing daily Date-wise i.e. <Partition Name>_<Day of Month>.

Can Statistics gathered Once into STATTAB be SQL Updated Suitably for Changed Partition names & IMPORTED thereafter Daily? If so which fields/Columns?

desc <STATTAB Name>

 Name                                      Null?    Type
 ----------------------------------------- --------
----------------------------
 STATID                                             VARCHAR2(30)
 TYPE                                               CHAR(1)
 VERSION                                            NUMBER
 FLAGS                                              NUMBER
 C1                                                 VARCHAR2(30)
 C2                                                 VARCHAR2(30)
 C3                                                 VARCHAR2(30)
 C4                                                 VARCHAR2(30)
 C5                                                 VARCHAR2(30)
 N1                                                 NUMBER
 N2                                                 NUMBER
 N3                                                 NUMBER
 N4                                                 NUMBER
 N5                                                 NUMBER
 N6                                                 NUMBER
 N7                                                 NUMBER
 N8                                                 NUMBER
 N9                                                 NUMBER
 N10                                                NUMBER
 N11                                                NUMBER
 N12                                                NUMBER
 D1                                                 DATE
 R1                                                 RAW(32)
 R2                                                 RAW(32)
 CH1                                                VARCHAR2(1000)

Thanks indeed for responding

-----Original Message-----
From: Alex Gorbachev [mailto:gorbyx_at_gmail.com] Sent: Saturday, October 15, 2005 4:00 AM To: breitliw_at_centrexcc.com
Cc: VIVEK_SHARMA; Oracle-L
Subject: Re: exporting / importing Object Stats?

In fact, you can even update stats table and set statistics for different users/tables/indexes. For example, I often update username (column C5 if I remeber well) to "clone" statistic to another schema. This can also be used for changed names of system generated columns.

2005/10/13, Wolfgang Breitling <breitliw_at_centrexcc.com>:
> Yes, as long as the schema, table, column, and index names are the
same.
> Watch out for system generated column names which are almost certainly
> different between databases (unles one is a clone of the other).
>
> VIVEK_SHARMA wrote:
> >
> >
> > A basic Qs
> >
> >
> >
> > After exporting a Table's "statistics" & will it's import into
another
> > Database containing the Same Table name & field Structure but
Different
> > Object ID be successful?
> >
> >
> >
> > e.g. When using following command for EMP Table
> >
> >

Dbms_stats.IMPORT_TABLE_STATS('TBAADM','EMP',STATTAB=>'SAVESTATS',STATOW N=>'TBAADM',CASCADE=>TRUE);

Received on Sat Oct 15 2005 - 00:36:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US