X-Original-To: pgsql-performance-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id A3E089FB235 for ; Thu, 10 Aug 2006 15:32:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 26181-06 for ; Thu, 10 Aug 2006 18:32:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from megazone.bigpanda.com (megazone.bigpanda.com [64.147.171.210]) by postgresql.org (Postfix) with ESMTP id 2EA9A9FB1F8 for ; Thu, 10 Aug 2006 15:32:31 -0300 (ADT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 70D8E3516D; Thu, 10 Aug 2006 11:32:25 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 6F0013515E; Thu, 10 Aug 2006 11:32:25 -0700 (PDT) Date: Thu, 10 Aug 2006 11:32:25 -0700 (PDT) From: Stephan Szabo To: Sue Fitt Cc: pgsql-performance@postgresql.org Subject: Re: setting up foreign keys In-Reply-To: <44DAE8CF.1030107@inf.ed.ac.uk> Message-ID: <20060810113004.K52796@megazone.bigpanda.com> References: <44DAE8CF.1030107@inf.ed.ac.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200608/191 X-Sequence-Number: 20376 On Thu, 10 Aug 2006, Sue Fitt wrote: > Hi all, > > This is my first post to the performance list, I hope someone can help me. > > I'm setting up a table with 2 columns, both of which reference a column > in another table: > > CREATE TABLE headwords_core_lexemes ( > core_id int REFERENCES headwords_core(core_id), > lexeme_id int REFERENCES headwords_core(core_id), > ); > > Trouble is, it's taken 18 hours and counting! What precisely is taking the time, the create table itself? The only thing that the create should be waiting for as far as I know is a lock on headwords_core to add the triggers.