pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Emi Lu <emilu@encs.concordia.ca>
To: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: CopyManager(In/out) vs. delete/insert directly
Date: Thu, 16 Oct 2014 14:30:54 -0400
Message-ID: <54400EDE.7030801@encs.concordia.ca> (raw)
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

Hello,

Two options for data (>1M), may I know which one better please?

(1) copyOut (JDBC copyManager)
      t1 into a.csv
      delete t2 where pk.cols in t1
      copyIn t2 from a.csv

(2) setautoCommit(false);
      delete t2 where pk.cols in t1;
      insert t2 select * from t1;

Thank you
Emi





-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



Message-ID: <54400EDE.7030801@encs.concordia.ca>
Permalink:  ../54400EDE.7030801@encs.concordia.ca/
Also on:    postgresql.org/message-id/54400EDE.7030801@encs.concordia.ca

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: emilu@encs.concordia.ca
  Subject: Re: CopyManager(In/out) vs. delete/insert directly
  In-Reply-To: <54400EDE.7030801@encs.concordia.ca>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox