Re: count(*) using index scan in "query often, update rarely" environment - Mailing list pgsql-performance

From hubert depesz lubaczewski
Subject Re: count(*) using index scan in "query often, update rarely" environment
Date
Msg-id 9e4684ce0510070254v67e08bcfhb725715803a5de25@mail.gmail.com
Whole thread Raw
In response to count(*) using index scan in "query often, update rarely" environment  ("Cestmir Hybl" <cestmirl@freeside.sk>)
List pgsql-performance
On 10/7/05, Cestmir Hybl <cestmirl@freeside.sk> wrote:
Isn't it possible (and reasonable) for these environments to keep track of whether there is a transaction in progress with update to given table and if not, use an index scan (count(*) where) or cached value (count(*)) to perform this kind of query?

if i understand your problem correctly, then simple usage of triggers will do the job just fine.

hubert

pgsql-performance by date:

Previous
From: "Cestmir Hybl"
Date:
Subject: count(*) using index scan in "query often, update rarely" environment
Next
From: "Cestmir Hybl"
Date:
Subject: Re: count(*) using index scan in "query often, update rarely" environment