Quick Answer
Hemant K Chitale, November 25, 2015 - 8:28 am UTC
Short Answer : Rebuild the table ORDERed BY the index key and then rebuild all indexes on the table.
Long Answer : Rebuild the table ORDERed BY the index key. Unfortunately, this means that the CLUSTERING_FACTOR of *other* Indexes on the table is changed.
Ask yourself if
(a) you can live with the impact of the change of other indexes CLUSTERING_FACTOR -- e.g. other query execution plans may change
(b) whether it is worth the time (downtime !) and effort to rebuild the table and all it's indexes
(c) whether changes (inserts, updates, deletes) to the data in subsequent days/weeks/months would mean that the CLUSTERING_FACTOR would have to change again each time you update Index Statistics
(d) what if the data that is frequently accessed (most popular) is already really clustered OR will change and uncluster very quickly
A reader, November 25, 2015 - 12:20 pm UTC
select clustering_factor from user_indexes where table_name='AGG_CLAIM_HP'and index_name='IND_CLAIM_HP_CLM_FCTKEY'
clustering_factor
----------------
2992271
select blocks from user_tables where table_name='AGG_CLAIM_HP'
blocks
-------
260505
INDEX_NAME clustering_factor
---------------- ----------
UK_IND_AGG_HP_KEY 3188452
BM_IND_AGG_HP_FACKEY 525
BM_IND_AGG_HP_ORGKEY 296
BM_IND_AGG_HP_DINDKEY 518
IND_CLAIM_HP_CLM_ACCT 3208438
IND_CLAIM_HP_CLM_FCTKEY 3208728
I did
-> reorganized the table
-> rebuild the indexes
-> Gathered statistics of tables and indexes.
Still some indexes clustering factor not nearer to tables blocks.
Please observe above statistics.
Thanks & Regards
Krishna
November 25, 2015 - 1:16 pm UTC
I'm assuming you read the whitepaper ?
Because, its fairly evident from it that the way the data is ORDERED within the table is what is going to impact the clustering factor.
of course, if just did 'alter table move' or "export/import' then perhaps you havent changed the order of the data at all...
To Krishna
Rajeshwaran, Jeyabal, November 25, 2015 - 1:34 pm UTC