Re: Importing a Large .ndjson file

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sankar P <sankar(dot)curiosity(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Importing a Large .ndjson file
Date: 2020-06-18 18:30:25
Message-ID: 1557194.1592505025@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sankar P <sankar(dot)curiosity(at)gmail(dot)com> writes:
> I spoke too soon. While this worked fine when there were no indexes
> and finished within 10 minutes, with GIN index on the jsonb column, it
> is taking hours and still not completing.

There's the generic advice that building an index after-the-fact
is often cheaper than updating it incrementally. For GIN indexes
specifically, see also

https://www.postgresql.org/docs/current/gin-tips.html

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2020-06-18 19:06:18 Re: create batch script to import into postgres tables
Previous Message Michael Lewis 2020-06-18 18:09:11 Re: Importing a Large .ndjson file