From oracle-l-bounce@freelists.org Mon Oct 10 17:32:38 2005 Return-Path: Received: from air891.startdedicated.com (root@localhost) by orafaq.com (8.12.10/8.12.10) with ESMTP id j9AMWcMq022545 for ; Mon, 10 Oct 2005 17:32:38 -0500 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air891.startdedicated.com (8.12.10/8.12.10) with ESMTP id j9AMWYvX022529 for ; Mon, 10 Oct 2005 17:32:34 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 70B041FA372; Mon, 10 Oct 2005 17:32:30 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18766-03; Mon, 10 Oct 2005 17:32:30 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id EB1361FA378; Mon, 10 Oct 2005 17:32:29 -0500 (EST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=rx/4uIDey4xQX7IGbQ5OPwr4kIEZruQaAiAxCYAUnJOT4IvHMkAt7zpgGNWpvfsV736+I13vDOde6TsVfMcjb1+S1VQ+3BtHxxWVjOTJ8z82/PLVjUJccThVULvKiz4kFzxsHcpXFLsWxhTMTRRsgh9PIurKz8/Gtb7FaFVGt/I= Message-ID: Date: Mon, 10 Oct 2005 23:30:34 +0100 From: Jared Still To: ajoshi977@yahoo.com Subject: Re: ** re-insert data in primary key order Cc: oracle-l@freelists.org In-Reply-To: <20051010214849.86040.qmail@web60718.mail.yahoo.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5309_23891478.1128983434061" References: <20051010214849.86040.qmail@web60718.mail.yahoo.com> X-archive-position: 26666 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: jkstill@gmail.com Precedence: normal Reply-To: jkstill@gmail.com X-list: oracle-l X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net X-mailscan-MailScanner-Information: Please contact the ISP for more information X-mailscan-MailScanner: Found to be clean X-MailScanner-From: oracle-l-bounce@freelists.org X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on air891.startdedicated.com X-Spam-Level: X-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE autolearn=ham version=2.63 ------=_Part_5309_23891478.1128983434061 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 10/10/05, A Joshi wrote: > > Hi, > I would like to know if delete and re-insert of table data in primary ke= y > 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? Than= ks > > ------------------------------ > 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 P= K 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 ------=_Part_5309_23891478.1128983434061 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
On 10/10/05, A Joshi <ajoshi977@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

=09=09



It might be helpful.

Reloading in PK so will decrease(improve) the clustering factor of the PK i= ndex, which
will increase the likelihood of using the index for a range scan when the P= K column(s)
are used as predicates in the WHERE clause.
eg. select * from my_table where PK between 'HHHHHHH'  and 'JJJJJJJJ'<= br>
If you are using surrogate(generated) primary keys, reloading the table wou= ld 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

------=_Part_5309_23891478.1128983434061-- -- http://www.freelists.org/webpage/oracle-l