Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Creating index affects my histogram
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