From: Tom Lane <tgl@sss.pgh.pa.us>
To: Josh Berkus <josh@agliodbs.com>
Cc: Kevin Brown <kevin@sysexperts.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
Date: Sat, 19 Apr 2003 16:26:49 -0400
Message-ID: <23265.1050784009@sss.pgh.pa.us> (raw)
In-Reply-To: <200304191203.18634.josh@agliodbs.com>
References: <EKEBJNAJDPKJBDFGJNIJAENMDBAA.denis@next2me.com>
<20030419130146.GI1847@filer>
<21955.1050767928@sss.pgh.pa.us>
<200304191203.18634.josh@agliodbs.com>
Josh Berkus <josh@agliodbs.com> writes:
> In PostgreSQL:
> a) Put table_count_A on superfast media like a RAM card so that random seeks
> after 10,000 updates do not become a significant delay;
As long as we're talking ugly, here ;-)
You could use a sequence to hold the aggregate counter. A sequence
isn't transactional and so does not accumulate dead tuples. "setval()"
and "select last_value" should have constant-time performance.
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, josh@agliodbs.com, kevin@sysexperts.com, pgsql-performance@postgresql.org
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
In-Reply-To: <23265.1050784009@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