pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steven Lembark <lembark@wrkhors.com>
To: pgsql-general@lists.postgresql.org
Cc: lembark@wrkhors.com
Subject: Re: large numbers of inserts out of memory strategy
Date: Wed, 29 Nov 2017 11:02:10 -0600
Message-ID: <20171129110210.59a57d4d@wrkhors.com> (raw)
In-Reply-To: <CAFPpqQGxt7oij-HF1S23uEQHZ=fAngsbe28TvXJQkijKMwwZhw@mail.gmail.com>
References: <CAFPpqQGux3uT=CNN-z=zXr4qSmfBw9tDCURimELqEWUBrBpL7A@mail.gmail.com>
	<74C96E30-97C3-45D1-887F-F876602355DE@gmail.com>
	<CAFPpqQGxt7oij-HF1S23uEQHZ=fAngsbe28TvXJQkijKMwwZhw@mail.gmail.com>


> > what tools / languages ate you using?  
> 
> I'm using python to read binary source files and create the text files
> contains the SQL. Them I'm running psql -f <file containing SQL>.

Then chunking the input should be trivial.
There are a variety of techniques you can use to things like disable
indexes during loading, etc. Maybe load them into temp tables and 
then insert the temp's into the destination tables. The point is to 
amortize the memory load over the entire load period.

-- 
Steven Lembark                                       1505 National Ave
Workhorse Computing                                 Rockford, IL 61103
lembark@wrkhors.com                                    +1 888 359 3508




view thread (27+ messages)  latest in thread

Message-ID: <20171129110210.59a57d4d@wrkhors.com>
Permalink:  ../20171129110210.59a57d4d@wrkhors.com/
Also on:    postgresql.org/message-id/20171129110210.59a57d4d@wrkhors.com

 · 

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: lembark@wrkhors.com
  Subject: Re: large numbers of inserts out of memory strategy
  In-Reply-To: <20171129110210.59a57d4d@wrkhors.com>
  References: <CAFPpqQGux3uT=CNN-z=zXr4qSmfBw9tDCURimELqEWUBrBpL7A@mail.gmail.com> <74C96E30-97C3-45D1-887F-F876602355DE@gmail.com> <CAFPpqQGxt7oij-HF1S23uEQHZ=fAngsbe28TvXJQkijKMwwZhw@mail.gmail.com> <20171129110210.59a57d4d@wrkhors.com>

* 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