pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Mladen Gogala <mladen.gogala@vmsinfo.com>
Cc: david@lang.hm <david@lang.hm>
Cc: Craig Ringer <craig@postnewspapers.com.au>
Cc: Vitalii Tymchyshyn <tivv00@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgreSQL.org>
Subject: Re: [PERFORM] Slow count(*) again...
Date: Wed, 2 Feb 2011 11:03:37 -0500 (EST)
Message-ID: <201102021603.p12G3bb09925@momjian.us> (raw)
In-Reply-To: <5100.1296601964@sss.pgh.pa.us>

Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
> > On 02/01/2011 05:47 PM, Bruce Momjian wrote:
> >> Tom Lane wrote:
> >>> At this point what we've got is 25% of the runtime in nodeAgg.c overhead,
> >>> and it's difficult to see how to get any real improvement without tackling
> >>> that.
> 
> >> Do we want a TODO about optimizing COUNT(*) to avoid aggregate
> >> processing overhead?
> 
> > Whether or not it's bad application design, it's ubiquitous, and we 
> > should make it work as best we can, IMNSHO. This often generates 
> > complaints about Postgres, and if we really plan for world domination 
> > this needs to be part of it.
> 
> I don't think that saving ~25% on COUNT(*) runtime will help that at all.
> The people who complain about it expect it to be instantaneous.
> 
> If this sort of hack were free, I'd be all for doing it anyway; but I'm
> concerned that adding tests to enable a fast path will slow down every
> other aggregate, or else duplicate a lot of code that we'll then have to
> maintain.

OK, thank you.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +



view thread (246+ messages)  latest in thread

Message-ID: <201102021603.p12G3bb09925@momjian.us>
Permalink:  ../201102021603.p12G3bb09925@momjian.us/
Also on:    postgresql.org/message-id/201102021603.p12G3bb09925@momjian.us

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: bruce@momjian.us, tgl@sss.pgh.pa.us, andrew@dunslane.net, mladen.gogala@vmsinfo.com, david@lang.hm, craig@postnewspapers.com.au, tivv00@gmail.com, pgsql-hackers@postgreSQL.org
  Subject: Re: [PERFORM] Slow count(*) again...
  In-Reply-To: <201102021603.p12G3bb09925@momjian.us>
  References: <5100.1296601964@sss.pgh.pa.us> <201102021603.p12G3bb09925@momjian.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