Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Very poor performance loading 100M of sql data using copy



John Rouillard wrote:

We can't do this as we are backfilling a couple of months of data into tables with existing data.

Is this a one off data loading of historic data or an ongoing thing?


The only indexes we have to drop are the ones on the primary keys
 (there is one non-primary key index in the database as well).

If this amount of data importing is ongoing then one thought I would try
is partitioning (this could be worthwhile anyway with the amount of data
you appear to have).
Create an inherited table for the month being imported, load the data into it, then add the check constraints, indexes, and modify the rules/triggers to handle the inserts to the parent table.



--

Shane Ambler
pgSQL (at) Sheeky (dot) Biz

Get Sheeky @ http://Sheeky.Biz



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group