Re: count * performance issue

From: Mark Kirkwood <markir(at)paradise(dot)net(dot)nz>
To: Craig James <craig_james(at)emolecules(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: count * performance issue
Date: 2008-03-07 02:40:45
Message-ID: 47D0AB2D.6080802@paradise.net.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Craig James wrote:
>
> My question is: What do the other databases do that Postgres can't do,
> and why not?
>
> Count() on Oracle and MySQL is almost instantaneous, even for very
> large tables. So why can't Postgres do what they do?
>

I think Mysql can only do that for the myisam engine - innodb and
falcon are similar to Postgres.

I don't believe Oracle optimizes bare count(*) on a table either - tho
it may be able to use a suitable index (if present) to get the answer
quicker.

regards

Mark

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Craig James 2008-03-07 03:00:17 Re: count * performance issue
Previous Message Stephen Denne 2008-03-07 02:30:41 Re: Why the difference in plans ?