On 30 June 2018 at 06:47, Srinivas Karthik V <skarthikv.i...@gmail.com> wrote:
> I was using copy command to load. Removing the primary key constraint on > the table and then loading it helps a lot. In fact, a 400GB table was > loaded and the primary constraint was added in around 15 hours. Thanks for > the wonderful suggestions. > > You can also gain a bit by running with wal_level = minimal. On newer version you can use UNLOGGED tables then convert them to logged, but that won't be an option for 9.4. -- Craig Ringer http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services