Re: A long-running transaction

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: A long-running transaction
Date: 2007-04-10 16:55:23
Message-ID: 20070410165523.GB20033@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, Apr 11, 2007 at 12:41:23AM +0800, John Summerfield wrote:

> The Linux kernel's clearly doing a lot of work, and the disk supports

You might also be into context-switch hell. What processor, which
kernel, and which Postgres version again?

> >>For each record, I update a non-key field in another table; the source
> >>data for that other table is less than a megabyte.
> >
> >this is a real issue. Basically, you're constrained at the rotation
> >speed of your disk, because for each record, you have to first find
> >then update one row somewhere else.
>
> It should be in cache: it's all one transaction, and on the laptop,

It's not in cache if you're updating -- you have to write it.

> there's over a Gbyte of RAM. Indeed, I would expect postgresql itself to
> cache it (except the fact it uses so little RAM suggests it doesn't do
> that at all).

What do you have configured as your shared buffers? If you haven't
given very much, there won't be much in the way of buffers used, of
course. Note that there's a much earlier diminishing return on the
size of shared buffers in Postgres than in many systems.

A

--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
The whole tendency of modern prose is away from concreteness.
--George Orwell

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message PostgreSQL Admin 2007-04-10 20:40:41 Replace string
Previous Message John Summerfield 2007-04-10 16:41:23 Re: A long-running transaction