Re: Massive Inserts Strategies

From: PFC <lists(at)peufeu(dot)com>
To: ashah <ashah(at)opuspro(dot)com>, pgsql <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Massive Inserts Strategies
Date: 2006-03-22 16:07:52
Message-ID: op.s6tofevzcigqcu@apollo13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


For both cases, you could COPY your file into a temporary table and do a
big JOIN with your existing table, one for inserting new rows, and one for
updating existing rows.
Doing a large bulk query is a lot more efficient than doing a lot of
selects. Vacuum afterwards, and you'll be fine.

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Jim C. Nasby 2006-03-22 16:09:25 Re: Massive Inserts Strategies
Previous Message Tom Lane 2006-03-22 15:35:26 Re: WAL logging of SELECT ... INTO command