Re: How long should it take to insert 200,000 records?

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Mark Lewis" <mark(dot)lewis(at)mir3(dot)com>
Cc: "Scott Marlowe" <smarlowe(at)g2switchworks(dot)com>, "Karen Hill" <karen_hill22(at)yahoo(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: How long should it take to insert 200,000 records?
Date: 2007-02-06 19:06:32
Message-ID: b42b73150702061106r7ed1d643k84e44f051dd68aaa@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 2/6/07, Mark Lewis <mark(dot)lewis(at)mir3(dot)com> wrote:
> > actually, I get the stupid award also because RI check to unindexed
> > column is not possible :) (this haunts deletes, not inserts).
>
> 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.

the database will not allow you to create a RI link out unless the
parent table has a primary key/unique constraint, which the database
backs with an index....and you can't even trick it afterwards by
dropping the constraint.

it's the other direction, when you cascade forwards when you can have
a problem. this is most common with a delete, but can also happen on
an update of a table's primary key with child tables referencing it.

merlin

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Mark Lewis 2007-02-06 19:10:53 Re: How long should it take to insert 200,000 records?
Previous Message Bruno Wolff III 2007-02-06 18:37:52 Re: How long should it take to insert 200,000 records?