From: | "Adam Fisher" <black(at)cia(dot)com(dot)au> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | referential integrity on existing table |
Date: | 2001-12-07 00:00:22 |
Message-ID: | 9up2fn$tac$1@news.tht.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi Everyone
My question is, is it possible to create a referential integrity constraint
on an exisiting, already populated, table??
My reasons for this are:
I am trying to copy two delimited text files into a database using the COPY
command. The first file - with about 280,000 lines - takes about 5-10
minutes to copy. The second file - with about 89,000 lines - is still
running after 4 days!
This second table has refrential integrity constraints on 3 fields (it's a
15 field table)
I have also copied this file into a table with no refential integrity
constraints and then used an INSERT command to copy the records into the
correct table. This is also taking days.
So, if I can't copy this file into a table and then apply the referential
integrity constraints, can anybody help me work out what my options are?
Thanks
Adam Fisher
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Snow | 2001-12-07 00:19:48 | Re: How to make a REALLY FAST db server? |
Previous Message | Stephan Szabo | 2001-12-06 23:14:53 | Re: Trigger problem |