2010/3/28 Thom Brown <[email protected]>: > The problem here is that you appear to require an index update, trigger > firing and constraint check for every single row. First thing I'd suggest > is remove the indexes. Apply that after your import, otherwise it'll have > to update the index for every single entry. +1
> And the trigger won't help > either. Import into a single table and split it out into further tables > after if required. note: partitioning could help if there were multiple physical volumes / spindles for data directory. for maximizing performance, I would rather split the CSV input (with awk/perl/whatever) before loading, to have one backend for each partition loader. > And finally the constraint should probably be applied > after too, so cull any violating rows after importing. +1 -- Filip Rembiałkowski JID,mailto:[email protected] http://filip.rembialkowski.net/ -- Sent via pgsql-general mailing list ([email protected]) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general
