From: | Don Seiler <don(at)seiler(dot)us> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | Srinivas Karthik V <skarthikv(dot)iitb(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Bulk Insert into PostgreSQL |
Date: | 2018-06-27 20:36:42 |
Message-ID: | CAHJZqBAjGNHT3ZyvkoU_ED6y5YQBVcVSzmqG+Hctj2k33LX3Og@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Jun 27, 2018 at 6:25 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
wrote:
>
>
>> Other parameters are set to default value. Moreover, I have specified the
>> primary key constraint during table creation. This is the only possible
>> index being created before data loading and I am sure there are no other
>> indexes apart from the primary key column(s).
>>
>
When doing initial bulk data loads, I would suggest not applying ANY
constraints or indexes on the table until after the data is loaded.
Especially unique constraints/indexes, those will slow things down A LOT.
>
> The main factor is using COPY instead INSERTs.
>
>
+1 to COPY.
--
Don Seiler
www.seiler.us
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2018-06-27 20:37:33 | Re: ALTER TABLE on system catalogs |
Previous Message | Peter Eisentraut | 2018-06-27 20:31:30 | ALTER TABLE on system catalogs |