From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Sullivan <andrew@libertyrms.info>
Cc: pgsql-performance@postgresql.org
Subject: Re: for help!
Date: Wed, 16 Apr 2003 12:01:56 -0400
Message-ID: <18664.1050508916@sss.pgh.pa.us> (raw)
In-Reply-To: <20030416155312.GF19999@libertyrms.info>
References: <Pine.LNX.4.33.0304151032440.18680-100000@css120.ihs.com>
<200304160848.36431.josh@agliodbs.com>
<20030416155312.GF19999@libertyrms.info>
Andrew Sullivan <andrew@libertyrms.info> writes:
> But you _could_ write a trigger which inserts into a "staging" table,
> and write a little daemon which only updates the count table with the
> data from the staging table. It's a mighty ugly hack, but it ought
> to work.
The $64 question with this sort of thing is "how accurate (up-to-date)
does the count have to be?".
Given that Josh is willing to vacuum every five minutes, he might find
that returning pg_class.reltuples is Close Enough (TM).
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-performance@postgresql.org
Cc: tgl@sss.pgh.pa.us, andrew@libertyrms.info
Subject: Re: for help!
In-Reply-To: <18664.1050508916@sss.pgh.pa.us>
References: <Pine.LNX.4.33.0304151032440.18680-100000@css120.ihs.com> <200304160848.36431.josh@agliodbs.com> <20030416155312.GF19999@libertyrms.info> <18664.1050508916@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