Re: database speed - Mailing list pgsql-general

From Greg Stark
Subject Re: database speed
Date
Msg-id 87ptgeavcl.fsf@stark.dyndns.tv
Whole thread Raw
In response to Re: database speed  ("Chris Stokes" <ChrisS@BassSoftware.com>)
List pgsql-general
"Chris Stokes" <ChrisS@BassSoftware.com> writes:

> I wondered if it might be a row chaining issue of some sort ?!?

Just to address this point:

Row Chaining is how Oracle deals with updates when the new record takes more
space than is available in the original block. Since Oracle does in-place
updates this is a real problem. It has to put a pointer in the first block to
a second overflow block. A busy table in which records often grow and shrink
can become slow because of having to follow all these pointers.

Postgres is very different. Updates in Postgres aren't in-place; every update
in Postgres is a delete and insert. Therefore there's no row-chaining problem,
in fact records can be packed (pctfree 0 pctused 100).

There are analogous problems though. It's easier to keep a heavily updated
table "clean" with postgres's approach but there are still a lot of cases to
consider. The free space can be fragmented (vacuum full can help that), the
data can be very poorly distributed (cluster can help that temporarily).

--
greg

pgsql-general by date:

Previous
From: "Uwe C. Schroeder"
Date:
Subject: Trigger or Rule ?
Next
From: Alex
Date:
Subject: DBD::Pg Err / Errstr