Re: count(*) using index scan in "query often, update rarely" environment

From: hubert depesz lubaczewski <depesz(at)gmail(dot)com>
To: Cestmir Hybl <cestmirl(at)freeside(dot)sk>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: count(*) using index scan in "query often, update rarely" environment
Date: 2005-10-07 09:54:23
Message-ID: 9e4684ce0510070254v67e08bcfhb725715803a5de25@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 10/7/05, Cestmir Hybl <cestmirl(at)freeside(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Cestmir Hybl 2005-10-07 10:14:29 Re: count(*) using index scan in "query often, update rarely" environment
Previous Message Cestmir Hybl 2005-10-07 09:24:05 count(*) using index scan in "query often, update rarely" environment