Re: RAM-only temporary tables

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Heikki Linnakangas" <heikki(dot)linnakangas(at)enterprisedb(dot)com>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Alvaro Herrera" <alvherre(at)commandprompt(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: RAM-only temporary tables
Date: 2008-11-21 23:18:20
Message-ID: 4926ED5C.EE98.0025.0@wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sorry for the late response; I was on vacation.

>>> Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Kevin, what was your original scenario like that led you to
investigate
> this?

We noticed a performance degradation in application code which, within
a database transaction, looped through large numbers of iterations
where each iteration created, used, and dropped a temporary table.
The temporary table always had several columns (typically ten to
twenty, many of which were varchar) and had a primary key.

We initially thought this was because of an upgrade of PostgreSQL from
8.2.5 to 8.3.4, but subsequent testing showed that it was because of
the concurrent update of the Linux kernel from one which defaulted to
not using write barriers to one which did default to using write
barriers. The file system was XFS on five spindles in RAID 5 on a
good BBU controller. Updating the relevant /etc/fstab entry with
nobarrier brought performance back to an acceptable level.

-Kevin

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-11-22 00:58:20 Re: Window functions review
Previous Message Bruce Momjian 2008-11-21 21:35:21 Re: Autoconf, libpq and replacement function