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

Home -> Community -> Usenet -> c.d.o.server -> Creating index affects my histogram

Creating index affects my histogram

From: Tom Barnes <barnest_at_san.rr.com>
Date: 22 Jan 2002 17:09:27 -0800
Message-ID: <ae6b6116.0201221709.4e30ffe4@posting.google.com>


When I created a new index using the "compute statistics"-clause, Oracle removed the histogram I created on the indexed column. Is it supposed to work like that?

SQL> SELECT num_buckets,last_analyzed
  2 FROM dba_tab_columns WHERE
  3 TABLE_NAME='S14' AND COLUMN_NAME='GY'; NUM_BUCKETS LAST_ANALYZED
----------- -------------------

        187 01/22/2002 16:20:15

SQL> CREATE INDEX s14_test ON s14(GY)
  2 TABLESPACE indx COMPUTE STATISTICS;

Index created.

SQL> SELECT num_buckets,last_analyzed
  2 FROM dba_tab_columns WHERE
  3 TABLE_NAME='S14' AND COLUMN_NAME='GY'; NUM_BUCKETS LAST_ANALYZED
----------- -------------------

          1 01/22/2002 16:36:06

Creating the index and analyzing separately like this doesn't affect my histogram:

CREATE INDEX s14_test ON s14(GY) TABLESPACE indx; ANALYZE INDEX s14_test COMPUTE STATISTICS;

Oracle8i Enterprise Edition 8.1.6 on Solaris. Received on Tue Jan 22 2002 - 19:09:27 CST

Original text of this message

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