Re: [SQL] Slow Inserts Again

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Frank Morton" <fmorton(at)base2inc(dot)com>
Cc: "Vadim Mikheev" <vadim(at)krs(dot)ru>, pgsql-sql(at)hub(dot)org
Subject: Re: [SQL] Slow Inserts Again
Date: 1999-05-03 15:47:04
Message-ID: 20133.925746424@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Frank Morton" <fmorton(at)base2inc(dot)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

Browse pgsql-sql by date

  From Date Subject
Next Message Herouth Maoz 1999-05-03 16:02:15 Re: [SQL] convert text to varchar
Previous Message Michael J Davis 1999-05-03 15:34:34 RE: [SQL] convert text to varchar