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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: ** re-insert data in primary key order

Re: ** re-insert data in primary key order

From: Jared Still <jkstill_at_gmail.com>
Date: Mon, 10 Oct 2005 23:30:34 +0100
Message-ID: <bf46380510101530y5f54d77eieea7f87995e5e1cc@mail.gmail.com>


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-l
Received on Mon Oct 10 2005 - 17:32:38 CDT

Original text of this message

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