Re: [SQL] Yet Another (Simple) Case of Index not used - Mailing list pgsql-performance

From Tom Lane
Subject Re: [SQL] Yet Another (Simple) Case of Index not used
Date
Msg-id 23265.1050784009@sss.pgh.pa.us
Whole thread Raw
In response to Re: [SQL] Yet Another (Simple) Case of Index not used  (Josh Berkus <josh@agliodbs.com>)
List pgsql-performance
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


pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
Next
From: Kevin Brown
Date:
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used