Re: Insert performance for large transaction with multiple COPY FROM - Mailing list pgsql-performance

From Tom Lane
Subject Re: Insert performance for large transaction with multiple COPY FROM
Date
Msg-id 24687.1358029611@sss.pgh.pa.us
Whole thread Raw
In response to Re: Insert performance for large transaction with multiple COPY FROM  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-performance
Jeff Janes <jeff.janes@gmail.com> writes:
> Will PG allow you to add a FK constraint where there is no usable
> index on the referenced side?

It will not, because the referenced side must have a unique constraint,
ie an index.

The standard performance gotcha here is not having an index on the
referencing side.  But that only hurts when doing UPDATEs/DELETEs of
referenced-side keys, which as far as I gathered was not the OP's
scenario.

            regards, tom lane


pgsql-performance by date:

Previous
From: Claudio Freire
Date:
Subject: Re: Insert performance for large transaction with multiple COPY FROM
Next
From: Horst Dehmer
Date:
Subject: Re: Insert performance for large transaction with multiple COPY FROM