X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 5133ED1B4E1 for ; Tue, 28 Oct 2003 15:51:59 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 14659-03 for ; Tue, 28 Oct 2003 11:51:32 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 2E7CFD1B529 for ; Tue, 28 Oct 2003 11:51:28 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h9SFpWit022515; Tue, 28 Oct 2003 10:51:32 -0500 (EST) To: Jeff Cc: pgsql-performance@postgresql.org Subject: Re: Adding foreign key performance In-reply-to: <20031028091645.3d610841.threshar@torgo.978.org> References: <20031028091645.3d610841.threshar@torgo.978.org> Comments: In-reply-to Jeff message dated "Tue, 28 Oct 2003 09:16:45 -0500" Date: Tue, 28 Oct 2003 10:51:32 -0500 Message-ID: <22514.1067356292@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/702 X-Sequence-Number: 4450 Jeff writes: > I recalled seeing a thread on -HACKERS about some major improvements to the speed of adding an FK to an existing table in 7.4. Naturally I was curious and decided to give it a whirl. My findings are not too good. In fact, they are bad. > 7.4b4, 10k shared buff, 256mb effective cache: 485706ms You are testing the wrong version. beta5 has the ADD FOREIGN KEY improvement. regards, tom lane