X-Original-To: pgsql-performance@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 326254764E2 for ; Wed, 14 May 2003 20:10:10 -0400 (EDT) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with ESMTP id 74492-02 for ; Wed, 14 May 2003 20:09:59 -0400 (EDT) Received: from shield.nordlb.lv (shield.pirmabanka.lv [195.114.57.4]) by postgresql.org (Postfix) with ESMTP id 51A59475B99 for ; Wed, 14 May 2003 20:09:58 -0400 (EDT) Received: from wall2.pirmabanka.lv (wall2-pub.nordlb.lv [195.114.57.14]) by shield.nordlb.lv (8.12.9/8.12.9) with SMTP id h4F0A0bg018665 for ; Thu, 15 May 2003 03:10:00 +0300 Received: from share.nordlb.lv ([10.0.0.10]) by wall2.pirmabanka.lv; Thu, 15 May 2003 03:09:58 +0300 (EET DST) Received: from pc311x1.nordlb.lv (localhost.localdomain [127.0.0.1]) by nordlb.lv (8.11.6/8.11.6) with SMTP id h4F09w719898 for ; Thu, 15 May 2003 03:09:58 +0300 Received: (qmail 2359 invoked by uid 100); 15 May 2003 00:12:39 -0000 Date: Thu, 15 May 2003 03:12:39 +0300 From: "Victor Yegorov" To: Rudi Starcevic Cc: Postgres Performance Subject: Re: constraint with reference to the same table Message-ID: <20030515001239.GC1549@nordlb.lv> References: <20030514162559.O51040-100000@megazone23.bigpanda.com> <3EC2D7D5.1010404@oasis.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <3EC2D7D5.1010404@oasis.net.au> User-Agent: Mutt/1.4.1i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/160 X-Sequence-Number: 1939 * Rudi Starcevic [15.05.2003 02:59]: > Hi, > > Can I confirm what this means then .. > > For large table's each column with ref. inegritry I should create an > index on those columns ? I think, that indicies are needed only at delete stage to decrease search time of possible referencing rows. Not only, of course, but when we speak about INSERT/UPDATE/DELETE data it is so. On the other side, indicies increases total query runtime, because for each row deleted/updated/inserted it'll be necessary to update each index. In my case, I at first drop "cyclic" constraints, do the job and then restore them. -- Victor Yegorov