| From: | Steve Adams |
| Date: | 23-May-2001 09:36 |
| Subject: | Compressing single column indexes |
|
|
Non-unique single column indexes can benefit from compression. With compression, key values are stored once per block in the prefix area, and only the rowids go into the data area. Otherwise, the key values are stored explicitly for each key. Here is an example ...
SQL> create table my_objects as select object_name, object_type from dba_objects;
Table created.
SQL> create index object_types on my_objects (object_type) compute statistics;
Index created.
SQL> select index_name, leaf_blocks from user_indexes where index_name = 'OBJECT_TYPES';
INDEX_NAME LEAF_BLOCKS
------------------------------ -----------
OBJECT_TYPES 93
SQL> alter index object_types rebuild compute statistics compress;
Index altered.
SQL> select index_name, leaf_blocks from user_indexes where index_name = 'OBJECT_TYPES';
INDEX_NAME LEAF_BLOCKS
------------------------------ -----------
OBJECT_TYPES 56
SQL>
|
![]() |
Your script uncompressed_indexes.sql returns indexes with only one column as candidates for compression. How can this be correct?
|