pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Frank Morton <fmorton@base2inc.com>
Cc: Vadim Mikheev <vadim@krs.ru>
Cc: pgsql-sql@hub.org
Subject: Re: [SQL] Slow Inserts Again
Date: Mon, 03 May 1999 11:47:04 -0400
Message-ID: <20133.925746424@sss.pgh.pa.us> (raw)
In-Reply-To: <070701be957a$59f46450$8355e5ce@base2inc.com>

"Frank Morton" <fmorton@base2inc.com> writes:
> I'm about to punt again and go back to figuring out how to make copy
> work. At this point, I'd have to convert the insert statements to copy.

Well, it'd be worth your while to get the quoting conventions straight
so that you could use copy instead of inserts.  But since we don't know
where this slower-and-slower behavior is coming from, I worry that you
will still see it with a copy.  Copy will avoid a lot of SQL-parsing
and query-planning overhead, but it doesn't make any real difference
when it comes down to writing tuples on the disk, AFAIK.

If you stop the process now, and then start a new backend working on
the as-yet-uninserted data, is the new backend equally slow right away?
If it's a memory problem, a fresh backend might be OK for a while.
(This is the root of Herouth's suggestion to reconnect every few
thousand records...)

			regards, tom lane



view thread (16+ messages)  latest in thread

Message-ID: <20133.925746424@sss.pgh.pa.us>
Permalink:  ../20133.925746424@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20133.925746424@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-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, fmorton@base2inc.com, vadim@krs.ru, pgsql-sql@hub.org
  Subject: Re: [SQL] Slow Inserts Again
  In-Reply-To: <20133.925746424@sss.pgh.pa.us>
  References: <070701be957a$59f46450$8355e5ce@base2inc.com> <20133.925746424@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