Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id B76389FB2F4 for ; Tue, 6 Feb 2007 14:38:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 51731-10 for ; Tue, 6 Feb 2007 14:37:56 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from wolff.to (wolff.to [66.93.197.194]) by postgresql.org (Postfix) with SMTP id 35DC99FB210 for ; Tue, 6 Feb 2007 14:38:03 -0400 (AST) Received: (qmail 28318 invoked by uid 500); 6 Feb 2007 18:37:52 -0000 Date: Tue, 6 Feb 2007 12:37:52 -0600 From: Bruno Wolff III To: Mark Lewis Cc: Merlin Moncure , Scott Marlowe , Karen Hill , pgsql-performance@postgresql.org Subject: Re: How long should it take to insert 200,000 records? Message-ID: <20070206183752.GB22967@wolff.to> Mail-Followup-To: Bruno Wolff III , Mark Lewis , Merlin Moncure , Scott Marlowe , Karen Hill , pgsql-performance@postgresql.org References: <1170722158.973141.208230@j27g2000cwj.googlegroups.com> <1170778484.5451.97.camel@state.g2switchworks.com> <1170780953.5451.99.camel@state.g2switchworks.com> <1170786686.16656.484.camel@archimedes> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1170786686.16656.484.camel@archimedes> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200702/71 X-Sequence-Number: 23125 On Tue, Feb 06, 2007 at 10:31:26 -0800, Mark Lewis wrote: > > Sure it's possible: > > CREATE TABLE parent (col1 int4); > -- insert many millions of rows into parent > CREATE TABLE child (col1 int4 REFERENCES parent(col1)); > -- insert many millions of rows into child, very very slowly. I don't think Postgres allows this. You don't have to have an index in the child table, but do in the parent table. Quote from http://developer.postgresql.org/pgdocs/postgres/sql-createtable.html: The referenced columns must be the columns of a unique or primary key constraint in the referenced table.