Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: ** re-insert data in primary key order
On 10/10/05, A Joshi <ajoshi977_at_yahoo.com> wrote:
>
> Hi,
> I would like to know if delete and re-insert of table data in primary key
> order is of help. And in what circumstances. Is there a way for Oracle to
> know or hint it that data is in primary key order? Any related info? Thanks
>
> ------------------------------
>
It might be helpful.
Reloading in PK so will decrease(improve) the clustering factor of the PK
index, which
will increase the likelihood of using the index for a range scan when the PK
column(s)
are used as predicates in the WHERE clause.
eg. select * from my_table where PK between 'HHHHHHH' and 'JJJJJJJJ'
If you are using surrogate(generated) primary keys, reloading the table
would seem
to have little benefit.
Best way to find out: create test cases and test for your environment.
-- Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist -- http://www.freelists.org/webpage/oracle-lReceived on Mon Oct 10 2005 - 17:32:38 CDT