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: analyze partitioned indexes

RE: analyze partitioned indexes

From: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Wed, 24 Oct 2001 11:59:58 -0700
Message-ID: <F001.003B389E.20011024121529@fatcity.com>

>-----Original Message-----
>From: Daiminger, Helmut [mailto:Helmut.Daiminger_at_KirchGruppe.de]
>
>I want to write a procedure that analyzes all my indexes. But I'm not sure whether my source code will also analyze partitioned indexes.

>...

Proof:
I created a partitioned table (my_table) with a global index, a locally partitioned index, and a globally partitioned index.

I also created a view (my_view) that shows the analyze date and num_rows for the table and its indexes and partitions. (see end of e-mail for table and view creation) SQL> analyze table my_table delete statistics ;

Table analysée.

SQL> select * from my_view ;

OBJECT_NAME                    ANALYZED               NUM_ROWS
------------------------------ -------------------- ----------
MY_INDEX1
MY_INDEX2
MY_INDEX2 (MY_INDEX2_P1)
MY_INDEX2 (MY_INDEX2_P2)
MY_INDEX3
MY_INDEX3 (MY_INDEX3_P1)
MY_INDEX3 (MY_INDEX3_P2)
MY_TABLE

MY_TABLE (MY_TABLE_P1)
MY_TABLE (MY_TABLE_P2) SQL> analyze table my_table compute statistics for table for all indexes ; Table analysée.

SQL> select * from my_view ;

OBJECT_NAME                    ANALYZED               NUM_ROWS
------------------------------ -------------------- ----------
MY_INDEX1                       2001/10/24 12:08:28          0
MY_INDEX2                       2001/10/24 12:08:28          0
MY_INDEX2 (MY_INDEX2_P1)        2001/10/24 12:08:28          0
MY_INDEX2 (MY_INDEX2_P2)        2001/10/24 12:08:28          0
MY_INDEX3                       2001/10/24 12:08:28          0
MY_INDEX3 (MY_INDEX3_P1)        2001/10/24 12:08:28          0
MY_INDEX3 (MY_INDEX3_P2)        2001/10/24 12:08:28          0
MY_TABLE                        2001/10/24 12:08:28          0
MY_TABLE (MY_TABLE_P1)          2001/10/24 12:08:28          0 MY_TABLE (MY_TABLE_P2)          2001/10/24 12:08:28          0 SQL> analyze table my_table delete statistics ; Table analysée.

SQL> select * from my_view ;

OBJECT_NAME                    ANALYZED               NUM_ROWS
------------------------------ -------------------- ----------
MY_INDEX1
MY_INDEX2
MY_INDEX2 (MY_INDEX2_P1)
MY_INDEX2 (MY_INDEX2_P2)
MY_INDEX3
MY_INDEX3 (MY_INDEX3_P1)
MY_INDEX3 (MY_INDEX3_P2)
MY_TABLE

MY_TABLE (MY_TABLE_P1)
MY_TABLE (MY_TABLE_P2) SQL> analyze index my_index3 compute statistics ; Index analysé.

SQL> select * from my_view ;

OBJECT_NAME                    ANALYZED               NUM_ROWS
------------------------------ -------------------- ----------
MY_INDEX1
MY_INDEX2
MY_INDEX2 (MY_INDEX2_P1)
MY_INDEX2 (MY_INDEX2_P2)
MY_INDEX3                       2001/10/24 12:08:57          0
MY_INDEX3 (MY_INDEX3_P1)        2001/10/24 12:08:57          0
MY_INDEX3 (MY_INDEX3_P2)        2001/10/24 12:08:57          0
MY_TABLE

MY_TABLE (MY_TABLE_P1)
MY_TABLE (MY_TABLE_P2) SQL> analyze index my_index3 delete statistics ; Index analysé.

SQL> select * from my_view ;

OBJECT_NAME                    ANALYZED               NUM_ROWS
------------------------------ -------------------- ----------
MY_INDEX1
MY_INDEX2
MY_INDEX2 (MY_INDEX2_P1)
MY_INDEX2 (MY_INDEX2_P2)
MY_INDEX3
MY_INDEX3 (MY_INDEX3_P1)
MY_INDEX3 (MY_INDEX3_P2)
MY_TABLE

MY_TABLE (MY_TABLE_P1)
MY_TABLE (MY_TABLE_P2) SQL> analyze index my_index2 partition (my_index2_p2) compute statistics ; Index analysé.

SQL> select * from my_view ;

OBJECT_NAME                    ANALYZED               NUM_ROWS
------------------------------ -------------------- ----------
MY_INDEX1
MY_INDEX2
MY_INDEX2 (MY_INDEX2_P1)
MY_INDEX2 (MY_INDEX2_P2)        2001/10/24 12:09:42          0
MY_INDEX3
MY_INDEX3 (MY_INDEX3_P1)
MY_INDEX3 (MY_INDEX3_P2)
MY_TABLE

MY_TABLE (MY_TABLE_P1)
MY_TABLE (MY_TABLE_P2) 10 ligne(s) sélectionnée(s). Received on Wed Oct 24 2001 - 13:59:58 CDT

Original text of this message

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