Re: Why count(*) doest use index? - Mailing list pgsql-general

From Glenn Maynard
Subject Re: Why count(*) doest use index?
Date
Msg-id AANLkTikdXqVPCSTthxDWqN_BQ9vt5XOPAXLwhsjOvRTO@mail.gmail.com
Whole thread Raw
In response to Re: Why count(*) doest use index?  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: Why count(*) doest use index?  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-general
On Sun, Mar 6, 2011 at 5:41 AM, Martijn van Oosterhout <kleptog@svana.org> wrote:
If it's really really important there are ways you can use trigger
tables and summary views to achieve the results you want. Except it's
expensive and when people are told that all of the sudden the count(*)
performance isn't so important any more. :)

That's often perfectly fine, with read-heavy, single-writer workloads.

I definitely wish there was a way to create indexes to track counters on various types of queries, even if it eliminates write concurrency on affected writes.  Doing it by hand is a pain.

--
Glenn Maynard

pgsql-general by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: FTS and words near one another
Next
From: Dimitri Fontaine
Date:
Subject: Re: How to Create Table from CSV