Re: COPY from temp table to main table insted of INSERT INTO

From: Stephen Froehlich <s(dot)froehlich(at)cablelabs(dot)com>
To: Andreas Kretschmer <andreas(at)a-kretschmer(dot)de>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: COPY from temp table to main table insted of INSERT INTO
Date: 2017-07-11 18:40:35
Message-ID: DM5PR06MB289102D564BA106653A46FA9E5AE0@DM5PR06MB2891.namprd06.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Will it be any faster if I put the INSERT INTO inside of a BEGIN INSERT INTO ... COMMIT?

-----Original Message-----
From: pgsql-novice-owner(at)postgresql(dot)org [mailto:pgsql-novice-owner(at)postgresql(dot)org] On Behalf Of Andreas Kretschmer
Sent: Tuesday, July 11, 2017 12:19 PM
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: [NOVICE] COPY from temp table to main table insted of INSERT INTO

Am 11.07.2017 um 19:04 schrieb Stephen Froehlich:
> I have already copied the source data over from R in an unnormalized
> form and then am normalizing it in SQL (via a series of queries).

in this case you can use insert into ... select ... from ...

Regards, Andreas

--
2ndQuadrant - The PostgreSQL Support Company.
www.2ndQuadrant.com

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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message David G. Johnston 2017-07-11 19:06:17 Re: COPY from temp table to main table insted of INSERT INTO
Previous Message Andreas Kretschmer 2017-07-11 18:19:25 Re: COPY from temp table to main table insted of INSERT INTO