pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Cosimo Streppone <cosimo@streppone.it>
To: pgsql-performance@postgresql.org
Subject: select count(*) on large tables
Date: Thu, 08 Apr 2004 11:43:49 +0200
Message-ID: <40751ED5.1010208@streppone.it> (raw)

Hello,

I've followed the last discussion about the particular case of
"select count(*)"s on large tables being somewhat slow.

I've seen also this issue already on the todo list, so I know
it is not a simple question.
This problem arises for me on very large tables, which I mean
starting from 1 million rows and above.

The alternative solution I tried, that has an optimal
speed up, unfortunately is not a way out, and it is based
on "EXPLAIN SELECT count(*)" output parsing, which
is obviously *not* reliable.

The times always get better doing a vacuum (and eventually
reindex) of the table, and they slowly lower again.

Is there an estimate time for this issue to be resolved?
Can I help in some way (code, test cases, ...)?

-- 
Cosimo




view thread (3+ messages)  latest in thread

Message-ID: <40751ED5.1010208@streppone.it>
Permalink:  ../40751ED5.1010208@streppone.it/
Also on:    postgresql.org/message-id/40751ED5.1010208@streppone.it

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: cosimo@streppone.it
  Subject: Re: select count(*) on large tables
  In-Reply-To: <40751ED5.1010208@streppone.it>

* 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