pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@tm.ee>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Christopher Browne <cbbrowne@libertyrms.info>
Cc: pgsql-performance@postgresql.org, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>
Subject: Re: COUNT(*) again (was Re: [HACKERS] Index/Function
Date: Sat, 04 Oct 2003 23:59:00 +0300
Message-ID: <1065301140.2746.37.camel@fuji.krosing.net> (raw)
In-Reply-To: <6102.1065283673@sss.pgh.pa.us>
References: <20031002191547.GZ87525@rlx11.zapatec.com>
	<20031002193905.GD18417@wolff.to>
	<3F7C98B8.C892D0E5@nsd.ca>
	<60brszcng5.fsf@dev6.int.libertyrms.info>
	<1065258004.2746.30.camel@fuji.krosing.net>
	<6102.1065283673@sss.pgh.pa.us>

Tom Lane kirjutas L, 04.10.2003 kell 19:07:
> Hannu Krosing <hannu@tm.ee> writes:
> > Christopher Browne kirjutas R, 03.10.2003 kell 00:57:
> >> A while back I outlined how this would have to be done, and for it to
> >> be done efficiently, it would be anything BUT simple.  
> 
> > Could this be made a TODO item, perhaps with your attack plan. 
> 
> If I recall that discussion correctly, no one including Christopher
> thought the attack plan was actually reasonable.
> 
> What this keeps coming down to is that an optimization that helps only
> COUNT(*)-of-one-table-with-no-WHERE-clause would be too expensive in
> development and maintenance effort to justify its existence.

Please read further in my email ;)

The point I was trying to make was that faster count(*)'s is just a side
effect. If we could (conditionally) keep visibility info in indexes,
then this would also solve the problem fo much more tricky question of
index-structured tables.

Count(*) is *not* the only query that could benefit from not needing to
go to actual data table for visibilty info, The much more needed case
would be the "inveres time series" type of queries, which would
otherways trash cache pages badly.

----------------------------
Hannu




view thread (6+ messages)  latest in thread

Message-ID: <1065301140.2746.37.camel@fuji.krosing.net>
Permalink:  ../1065301140.2746.37.camel@fuji.krosing.net/
Also on:    postgresql.org/message-id/1065301140.2746.37.camel@fuji.krosing.net

 · 

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: hannu@tm.ee, tgl@sss.pgh.pa.us, cbbrowne@libertyrms.info, pgsql-hackers@postgresql.org
  Subject: Re: COUNT(*) again (was Re: [HACKERS] Index/Function
  In-Reply-To: <1065301140.2746.37.camel@fuji.krosing.net>
  References: <20031002191547.GZ87525@rlx11.zapatec.com> <20031002193905.GD18417@wolff.to> <3F7C98B8.C892D0E5@nsd.ca> <60brszcng5.fsf@dev6.int.libertyrms.info> <1065258004.2746.30.camel@fuji.krosing.net> <6102.1065283673@sss.pgh.pa.us> <1065301140.2746.37.camel@fuji.krosing.net>

* 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