FAQ
Hi

Is it possible export a partition statistics and import to another partiton
(in the same table)? I have tried it but doesnt seem to work in 9.2.0.8, or
may be never worked but to be honest have not tried before.

select table_name, partition_name, num_Rows from user_tab_partitions;

TABLE_NAME PARTITION_NAME NUM_ROWS
------------------------------ ------------------------------ ----------
GTADEPT GTADEPT1 0
GTADEPT GTADEPT2 0
GTADEPT GTADEPT3 1
GTADEPT GTADEPT4 6
GTADEPT GTADEPT5 4
GTADEPT GTADEPT6 6
GTADEPT GTADEPT7 0
GTADEPT GTADEPT8 0
GTADEPT GTADEPT9 0

exec dbms_stats.export_table_stats('SCOTT', 'GTADEPT', 'GTADEPT5',

'TABSTATS')

exec dbms_stats.import_table_stats('SCOTT', 'GTADEPT', 'GTADEPT9',

'TABSTATS')

select table_name, partition_name, num_Rows from user_tab_partitions;

TABLE_NAME PARTITION_NAME NUM_ROWS
------------------------------ ------------------------------ ----------
GTADEPT GTADEPT1 0
GTADEPT GTADEPT2 0
GTADEPT GTADEPT3 1
GTADEPT GTADEPT4 6
GTADEPT GTADEPT5 4
GTADEPT GTADEPT6 6
GTADEPT GTADEPT7 0
GTADEPT GTADEPT8 0
GTADEPT GTADEPT9 0

TIA

Search Discussions

  • LS Cheng at Sep 18, 2007 at 2:42 pm
    Hi

    You have to update TABSTATS.C2 with new partition name then import

    thanks

    --
    LSC
    On 9/18/07, amonte wrote:

    Hi

    Is it possible export a partition statistics and import to another
    partiton (in the same table)? I have tried it but doesnt seem to work in
    9.2.0.8, or may be never worked but to be honest have not tried before.


    select table_name, partition_name, num_Rows from user_tab_partitions;

    TABLE_NAME PARTITION_NAME NUM_ROWS
    ------------------------------ ------------------------------ ----------
    GTADEPT GTADEPT1 0
    GTADEPT GTADEPT2 0
    GTADEPT GTADEPT3 1
    GTADEPT GTADEPT4 6
    GTADEPT GTADEPT5 4
    GTADEPT GTADEPT6 6
    GTADEPT GTADEPT7 0
    GTADEPT GTADEPT8 0
    GTADEPT GTADEPT9 0


    exec dbms_stats.export_table_stats('SCOTT', 'GTADEPT', 'GTADEPT5',
    'TABSTATS')

    exec dbms_stats.import_table_stats('SCOTT', 'GTADEPT', 'GTADEPT9',
    'TABSTATS')

    select table_name, partition_name, num_Rows from user_tab_partitions;

    TABLE_NAME PARTITION_NAME NUM_ROWS
    ------------------------------ ------------------------------ ----------
    GTADEPT GTADEPT1 0
    GTADEPT GTADEPT2 0
    GTADEPT GTADEPT3 1
    GTADEPT GTADEPT4 6
    GTADEPT GTADEPT5 4
    GTADEPT GTADEPT6 6
    GTADEPT GTADEPT7 0
    GTADEPT GTADEPT8 0
    GTADEPT GTADEPT9 0


    TIA

    --
    http://www.freelists.org/webpage/oracle-l

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouporacle-l @
categoriesoracle
postedSep 18, '07 at 1:49p
activeSep 18, '07 at 2:42p
posts2
users2
websiteoracle.com

2 users in discussion

LS Cheng: 1 post Amonte: 1 post

People

Translate

site design / logo © 2022 Grokbase