Re: [SQL] Yet Another (Simple) Case of Index not used

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kevin Brown <kevin(at)sysexperts(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: [SQL] Yet Another (Simple) Case of Index not used
Date: 2003-04-21 01:53:20
Message-ID: 21712.1050890000@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance pgsql-sql

Kevin Brown <kevin(at)sysexperts(dot)com> writes:
> Personally, I'd rather see such development effort go towards more
> beneficial improvements, such as replication, 2PC, SQL/MED, etc. (or
> even improving the efficiency of MVCC, since it was mentioned here as
> a problem! :-). I consider COUNT(*) without a WHERE clause to be a
> corner case, despite the frequency of questions about it.

Exactly.

> But I don't
> think we should reject a patch to implement fast COUNT(*) just because
> it represents a performance tradeoff, at least if it's GUC-controlled.

Well, this is moot since I see no one offering to provide such a patch.
But performance tradeoffs are only one of the costs involved. I suspect
any such mechanism would be invasive enough to represent a nontrivial
ongoing maintenance cost, whether anyone uses it or not. The extent
to which it munges core functionality would have to be a factor in
deciding whether to accept it. It'd take lots more thought than we've
expended in this thread to get an accurate handle on just what would
be involved...

(BTW, if anyone actually is thinking about this, please make it a
per-table option not a global GUC option.)

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lamar Owen 2003-04-21 02:00:16 Re: Upgrade to RedHat 9.0 broke PostgreSQL
Previous Message Tom Lane 2003-04-21 01:34:10 Re: stddev returns 0 when there is one row

Browse pgsql-performance by date

  From Date Subject
Next Message Josh Berkus 2003-04-21 16:14:43 Re: [SQL] Yet Another (Simple) Case of Index not used
Previous Message Kevin Brown 2003-04-21 00:46:30 Re: [SQL] Yet Another (Simple) Case of Index not used

Browse pgsql-sql by date

  From Date Subject
Next Message foo2 2003-04-21 04:25:44 Ok,, what about cache for SEQUENCE - where? how?
Previous Message Kevin Brown 2003-04-21 00:46:30 Re: [SQL] Yet Another (Simple) Case of Index not used