From: | Emi Lu <emilu(at)encs(dot)concordia(dot)ca> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | CopyManager(In/out) vs. delete/insert directly |
Date: | 2014-10-16 20:04:37 |
Message-ID: | 544024D5.7020301@encs.concordia.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<small>Hello,
<br>
<br>
Two options for data (>1M), may I know which one better please?
<br>
<br>
(1) copyOut (JDBC copyManager)
<br>
t1 into a.csv
<br>
delete t2 where pk.cols in t1
<br>
copyIn t2 from a.csv
<br>
<br>
(2) setautoCommit(false);
<br>
delete t2 where pk.cols in t1;
<br>
insert t2 select * from t1;
<br>
<br>
Thank you
<br>
Emi
</small><br>
</body>
</html>
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/html | 802 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2014-10-16 20:09:40 | Re: Any postgres API available to get errorcode for PQerrorMessage |
Previous Message | Tom Lane | 2014-10-16 20:04:28 | Re: Tables used in query not listed in EXPLAIN |