pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nikola Ivacic <nikola@rs-pi.com>
To: pgsql-sql@postgresql.org
Subject: count(*) optimization
Date: Wed, 8 Jan 2003 17:04:40 +0100
Message-ID: <024d01c2b72f$a6a7dcc0$1100a8c0@rspi> (raw)

Hi

I have trouble executing count(*) statement.
On a large dataset it takes quite a while to return result.
Is there any other way to get number of tupples in relation 
or is the only way to optimize count() function to index it? 

thanks

Nikola

view thread (5+ messages)  latest in thread

Message-ID: <024d01c2b72f$a6a7dcc0$1100a8c0@rspi>
Permalink:  ../024d01c2b72f$a6a7dcc0$1100a8c0@rspi/
Also on:    postgresql.org/message-id/024d01c2b72f$a6a7dcc0$1100a8c0@rspi

 · 

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-sql@postgresql.org
  Cc: nikola@rs-pi.com
  Subject: Re: count(*) optimization
  In-Reply-To: <024d01c2b72f$a6a7dcc0$1100a8c0@rspi>

* 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