pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sankar P <sankar.curiosity@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Importing a Large .ndjson file
Date: Thu, 18 Jun 2020 14:30:25 -0400
Message-ID: <1557194.1592505025@sss.pgh.pa.us> (raw)
In-Reply-To: <CAMSEaH7Vkh3JfwjJfFjQH-UtjEf71aSgA0aEEjqpE42MnLUYcQ@mail.gmail.com>
References: <CAMSEaH5SfyfXN_rSah41dOOA_aAik4hZED0qp52=1wqzjz-pMA@mail.gmail.com>
	<1446220.1592407101@sss.pgh.pa.us>
	<CAMSEaH4M1v_umOP=H-rOmW=oLkHYRFuZ9Ed11-TeqOeGxX8V5A@mail.gmail.com>
	<CAMSEaH7Vkh3JfwjJfFjQH-UtjEf71aSgA0aEEjqpE42MnLUYcQ@mail.gmail.com>

Sankar P <sankar.curiosity@gmail.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





view thread (7+ messages)  latest in thread

Message-ID: <1557194.1592505025@sss.pgh.pa.us>
Permalink:  ../1557194.1592505025@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1557194.1592505025@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sankar.curiosity@gmail.com
  Subject: Re: Importing a Large .ndjson file
  In-Reply-To: <1557194.1592505025@sss.pgh.pa.us>
  References: <CAMSEaH5SfyfXN_rSah41dOOA_aAik4hZED0qp52=1wqzjz-pMA@mail.gmail.com> <1446220.1592407101@sss.pgh.pa.us> <CAMSEaH4M1v_umOP=H-rOmW=oLkHYRFuZ9Ed11-TeqOeGxX8V5A@mail.gmail.com> <CAMSEaH7Vkh3JfwjJfFjQH-UtjEf71aSgA0aEEjqpE42MnLUYcQ@mail.gmail.com> <1557194.1592505025@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox