Re: [SQL] Slow Inserts Again - Mailing list pgsql-sql

From Tom Lane
Subject Re: [SQL] Slow Inserts Again
Date
Msg-id 20133.925746424@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SQL] Slow Inserts Again  ("Frank Morton" <fmorton@base2inc.com>)
List pgsql-sql
"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


pgsql-sql by date:

Previous
From: Michael J Davis
Date:
Subject: RE: [SQL] convert text to varchar
Next
From: Herouth Maoz
Date:
Subject: Re: [SQL] convert text to varchar