On Feb 4, 2005, at 8:30 AM, Joolz wrote:
Sean Davis zei:I use a trigger on tables with foreign key references to either ignore the insert row or insert an appropriate matching row in the referencedThanks Sean, but in my situation I don't want the database to be so versatile as to handle all the errors itself, this would create unneccesary load during all operations on the tables, not only when running the import.
Just drop the trigger once the table is copied. In my application (a hundred thousand to million rows or so per table), using copy rather than DBI inserts is an order of magnitude or two faster, even with the triggers in place.
Sean
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend