pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruno Wolff III <bruno@wolff.to>
To: Mark Lewis <mark.lewis@mir3.com>
Cc: Merlin Moncure <mmoncure@gmail.com>
Cc: Scott Marlowe <smarlowe@g2switchworks.com>
Cc: Karen Hill <karen_hill22@yahoo.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: How long should it take to insert 200,000 records?
Date: Tue, 6 Feb 2007 12:37:52 -0600
Message-ID: <20070206183752.GB22967@wolff.to> (raw)
In-Reply-To: <1170786686.16656.484.camel@archimedes>
References: <1170722158.973141.208230@j27g2000cwj.googlegroups.com>
	<1170778484.5451.97.camel@state.g2switchworks.com>
	<b42b73150702060840y5594ca57mace48fdbdb21fb78@mail.gmail.com>
	<1170780953.5451.99.camel@state.g2switchworks.com>
	<b42b73150702060901n7291a644xe496ed93962ed9f6@mail.gmail.com>
	<1170786686.16656.484.camel@archimedes>

On Tue, Feb 06, 2007 at 10:31:26 -0800,
  Mark Lewis <mark.lewis@mir3.com> 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.



view thread (16+ messages)  latest in thread

Message-ID: <20070206183752.GB22967@wolff.to>
Permalink:  ../20070206183752.GB22967@wolff.to/
Also on:    postgresql.org/message-id/20070206183752.GB22967@wolff.to

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: bruno@wolff.to, mark.lewis@mir3.com, mmoncure@gmail.com, smarlowe@g2switchworks.com, karen_hill22@yahoo.com
  Subject: Re: How long should it take to insert 200,000 records?
  In-Reply-To: <20070206183752.GB22967@wolff.to>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox