From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter T. Brown <peter@memeticsystems.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: performance tuning on inserts
Date: Mon, 28 Jan 2002 15:34:59 -0500
Message-ID: <22434.1012250099@sss.pgh.pa.us> (raw)
In-Reply-To: <002e01c1a839$92be6cc0$7d00000a@PETER>
References: <002e01c1a839$92be6cc0$7d00000a@PETER>
"Peter T. Brown" <peter@memeticsystems.com> writes:
> Regarding the SQL: The query I showed there is built dynamically from a
> library of queries chosen by the application user (using a web gui). For
> now, I don't have any way to intelligently condense the often complex series
> of operations into a single 'smart' query.
Nonetheless, I wonder whether you couldn't reconsider the structure.
The fragment you showed seemed to be of two minds about whether
VisitorPointer is a permanent data structure or a suitable place for
temporary row insertions...
> That being said, I still don't understand why doing all those inserts should
> take so long since the entire table should be in memory... I am pretty sure
> I've allowed enough shared_buffers.
You still need WAL traffic. Or don't you care whether those inserts
will survive a system crash? In-RAM buffers surely don't count as
stable storage.
> Regarding timestamps in pg_xlog: as I understand things, if wal_buffers and
> checkpoint_segments are high enough the files in pg_xlog should never be
> used, right?
No, you haven't understood things at all. WAL *will* be written
whenever you make changes, at the latest when the transaction is
committed.
regards, tom lane
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-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, peter@memeticsystems.com
Subject: Re: performance tuning on inserts
In-Reply-To: <22434.1012250099@sss.pgh.pa.us>
References: <002e01c1a839$92be6cc0$7d00000a@PETER> <22434.1012250099@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